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
monkeymonkey 

Updating Task Dates

I'm having trouble updating a task in Salesforce using the Salesforce.pm module. I have tried setting the date field to be:
2004-12-31
2004-12-31T00:00:00
2004-12-31T00:00:00+00:00Z

all of which result in the same error:

ActivityDate: value not of required type:

Any ideas on how I should format the item: Here is what I'm doing right now.

$$task{'type'} = 'Task';
$$task{'ActivityDate'} = '2004-12-31';
$result = $sforce->update(%$task);

The $task variable is from a previous query.
monkeymonkey
So in answer to my own question. I have a solution. When setting the value of the item you need to specify that it is of the type xsd:date. This can be done with the SOAP:ate object like this:

$$task{'ActivityDate'} = Soap:ate->type('xsd:date' => "2004-12-31");

And this works great.