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
SkutchSkutch 

Date/Time argument format for OpenCti SaveLog method

When using the Open CTI interface and calling the "saveLog" method passing in a date/time value it does not seem to be saved into the object but all other fields are saved and no error message is passed back in the call back function - it just appears the date / time information is discarded

 

The date / time field in question is a custom field

 

This is not a field naming issue because if the name is incorrect a relevant error message is thrown back indicating that is the case

 

The date / time format is the one specified for the REST API but I have also tried a number of other variants

 

Below is an example of the request:

 

 sforce.interaction.saveLog('Task', 'Subject=ImportantTask&customDateTimeField__c=2013-10-20T12:38:00.000+0000', saveLogCallback);

 

In the above example a Task object would be created and the subject would be "ImportantTask" and the field 'customDateTimeField__c' would be empty

 

I suspect I am simply using the incorrect date/time format - if anyone knows the correct date/time format that would be very helpful

sfdcAnonsfdcAnon
Hi Skutch,

I realize this reply is extremley late, but hopefully it will be of some help to others.

Here's the format for the saveLog call with a DateTime field:

sforce.interaction.saveLog('Task','reminderDateTime=2014-12-25 19:00:00&mytime__c=2014-12-24 19:00:00& isReminderSet=true&Subject=Call&Description=TestMyTask&ActivityDate=2014-02-05', callback);

Where reminderDateTime and mytime (custom field) are of type DateTime. The DateTime format is YYYY-MM-DD HH:MM:SS , where timezone is GMT.

Note that if, for example, 2014-12-24 19:00:00 is entered, and timezone of current user is PST, the 19:00:00 (GMT) part gets converted to 11:00:00 (PST).

Hope that helps.
Bledar DindiBledar Dindi
Thanks @sfdcAnon, this helped.