+ Reply to Thread
Results 1 to 2 of 2
This is a discussion on Setting a picklist Value with a SOQL command within the Salesforce Coding Discussions forums, part of the Salesforce category; In Salesforce, we have a custom object built that has a picklist
  1. #1
    jarrettcoggin is offline Junior Member
    Join Date
    Jul 2009
    Posts
    14

    Setting a picklist Value with a SOQL command

    In Salesforce, we have a custom object built that has a picklist for one of the values. I'm not sure how to set the picklist value with SOQL. Anyone have any ideas?

    Here's what I'm currently doing:

    PHP Code:
    $soqlcmd "Select e.PickListField, e.Id from CustomObject e where e.Id = '" $id "'";
     
    $result $this->client->query($soqlcmd);
            
     foreach (
    $result->records as $record){
          
    $sObject = new sObject();
          
    $sObject->type 'CustomObject';
          
    $sObject->Id $record->Id;
          
    $sObject->fields = array('PickListField' => $newPickListValue);
          
    $returnResult $this->client->update(array($sObject));
      } 

  2. #2
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    607
    Blog Entries
    16
    Jarrett

    Is this in a class that you created?
    let me play around with this for a day or so

    Sorry for the delay in replying, I have been busy as heck!!


    ~Mike

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO 3.5.2