+ Start a Discussion

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:

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.
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.