• brodrigu
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi all -

I've been working today on a simple PHP page that will record a user's response in a form and update a corresponding field on their account. I'm getting a success message from my update() code when I print_r, but I'm not actually seeing any updated information in my accounts. The code I have is as follows:


Code:
$prop = addslashes($_GET['prop']);
$rank = $_POST['NPS'];
 
$nps = new sObject();
$nps->type = 'Account';
$nps->Id = $prop;
$nps->fields = array('NPS_2__c' => '$rank', 'NPS_2_Date__c' => 'DATE');

print_r($mySforceConnection->update($nps)); 
echo "Thank you for your response. Your information has been submitted.";

 The ID is a known field that will be a passed variable in the URL. When the page is accessed and the form is submitted, I get the following print message:

stdClass Object ( [id] => 0017000000NoRVFAA3 [success] => 1 ) Thank you for your response. Your information has been submitted.

However, like I said, if I check the fields in the sObject on the Account page, they have not been updated. I know it's got to be something simple I'm overlooking, but it's Monday of course. Any help will be greatly appreciated.

Thanks!!

Travis Vignon

  • September 29, 2008
  • Like
  • 0