function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
satpreetsatpreet 

php_sforce_nusoap error for CloseDate

I'm using the php_sforce_nusoap created by rchoi21 but when trying to create a new Oppurtunity and sending in a CloseDate, the generated XML sets the xsi:type="xsd:string" for CloseDate. This returns the error "INVALID_TYPE_ON_FIELD_IN_RECORD". Has anyone else run into this? I tried to change the Dynamic sObject definition is the partner.wsdl file and specified CloseDate as a xsd:date type but it doesn't seem to be reading it. :-\



Any help would be greatly appreciated... this is my first post on here, so I may not have included the necessary information - let me know what might help and I'll post it.

Message Edited by satpreet on 12-19-2005 09:06 AM

rchoi21rchoi21
$testDateEl = new soapval('TestDate__c', 'dateTime', '2005-12-19T19:51:12.174Z');

// create Contact
$contact = new sObject('Contact',
null,
array(
'FirstName' => 'Test',
'LastName' => 'Date',
$testDateEl,
)
);

$createResult = $sfdc->create($contact);