• natefriedman
  • NEWBIE
  • 0 Points
  • Member since 2007

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

 Hi All,

I need to create a case from the api and I have that part working but I need to set the AssignmentRuleHeader to use the defaul rules and I cant find any samples.  I'm lot on where or how to set it in my code. I see the functions are there in php toolkit.

Any help would be great...been at it for a few hours.

Thanks!

 

    $mySforceConnection = new SforcePartnerClient();
    $mySforceConnection->createConnection(SF_WSDL);
    $loginResult = $mySforceConnection->login(SF_USER_NAME, SF_PASSWORD);

try {
 
        $createFields = array (
          'Subject' => 'This is a test Case',
        );
        $sObject1 = new SObject();
        $sObject1->fields = $createFields;
        $sObject1->type = 'Case';
        $createResult = $mySforceConnection->create(array (
          $sObject1
        ));


  echo "<br>Case: ".$createResult->id;

    } catch (Exception $e) {
      global $errors;
      $errors = $e->faultstring;
      echo $errors;
    }