• phyroslam
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Has anyone implemented the convertlead function within the php-client, not the nusoap client, I´m using right now the PEAR php-client but this has not yet implemented this call.
I´m using API to create a case, this is the code I´m using:


$FIELDS = array('type'=>'Case');

$FIELDS['ContactId'] = $contact;
$FIELDS['AssetId'] = $asset;
$FIELDS['RecordTypeId'] = '0123000000005tA';
$FIELDS['Subject'] = 'SUBJECT';




$result = $client->create($FIELDS);

This is the error I´m geting this error:

[fields] => AssetId [message] => bad field names on insert/update call: AssetId [statusCode] => INVALID_FIELD_FOR_INSERT_UPDATE


But When I use the following code I get no errors and the case is created:


$FIELDS = array('type'=>'Case');

$FIELDS['ContactId'] = $contact;
//$FIELDS['AssetId'] = $asset;
$FIELDS['RecordTypeId'] = '0123000000005tA';
$FIELDS['Subject'] = 'SUBJECT';




$result = $client->create($FIELDS);


How can I creat a case related to a contact and to an asset?