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
StaciStaci 

is not a valid value for the type xsd:dateTime

 

The complete error is:

A problem witht he OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client',

faultstring:"2013-04-30T20:00:08.263+06.5:30' is not a valid value for the type xsd:dateTime',}

 

We have a Take Case button with the following code:

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} 

var caseObj = new sforce.SObject("Case"); 

caseObj.Id = '{!Case.Id}'; 
caseObj.OwnerId = '{!$User.Id}'; 
caseObj.Status = 'In Progress'; 

var roleName = '{!$UserRole.Name}'; 
if((roleName.indexOf("Tier 3") != -1) || (roleName.indexOf("Field Operation") != -1) || (roleName.indexOf("Service Engineer") != -1))
 { 
caseObj.Substatus__c = 'Open with Product Specialists'; 
} 
else 
{ 
caseObj.Substatus__c = 'Open with Support Advocates'; 
} 

if('{!Case.Incident_First_Response__c}'=='') 
{ 
caseObj.Incident_First_Response__c=new Date(); 
} 

var result = sforce.connection.update([caseObj]); 

if (result[0].success=='false') { 
alert(result[0].errors.message); 
} else { 
window.parent.location.href="/{!Case.Id}"; 
}

 

 

 

 

If a users PC time zone is set for any that are +6:30 or +5:30 (not on the hour, but the half hour) and they try to click this button they receive this error.  Is there a way to correct this?

TMangoTMango
Was there ever an answer to this?  I am running into the same issues ...
Amit VaidyaAmit Vaidya
Hi All,

Leslie Brohm explained it as below.

Yes, it can be solved by giving the DateTime format as YYYY-MM-DD HH:MM:SSZ. So for example you can try something like this format it as 2012-11-17 13:30:00Z.

Thanks,
Amit
vermajai1995vermajai1995
@AmitVaida How to convert in this date format in jquery?