I can insert data to salesforce in any standard object Like Leads, Contacts etc . But my client has created a custom object . That object name is survey , and there are several survey questions Like your occupation ? Do you own or rent etc . I can't insert data into Survey . In case of Standard object I can insert data by using salesforce php toolkit . Like below
$lead = new stdClass;
$lead->type = '';
$lead->fields = array(
'Own_Or_Rent__c' => 'Own',
'Your_Occupation__c' =>'Job',
);
$result = $mySforceConnection_enterprise->create(array($lead), 'Lead');
But in this case my client has provided me with the ID of the the object "Survey__c" and and ids of those question like a04g000000CcfSAAAZ, a04g000000CcfSPAAZ etc . How can I insert survey result with these kind of info ?
I have tried like this
$lead = new stdClass;
$lead->type = '';
$lead->fields = array(
a04g000000CcfSAAAZ => 'Own',
'Your_Occupation__c' => 'Job',
);
$result = $mySforceConnection_enterprise->create(array($lead), 'Survey__c');
But it didn't work