• TTT
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
We're attempting to utilize a custom button to set the value of a custom date/time field. The custom field (PM_REVIEW_DATE) is defined as DateTime. All the button attempts to do is set the field to Now() and then update the case and reload the window. When we click the button, we get the following error:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client',faultstring:"9/12/2007 12:15 PM' is not a valid value for the type xsd:dateTime',}

The javascript defined with the button is as follows:

{!REQUIRESCRIPT("/soap/ajax/8.0/connection.js")}
var c = new sforce.SObject("Case");
c.id = "{!Case.Id}";
c.PM_Review_Date__c='{!NOW()}';
result = sforce.connection.update([c]);
window.location.reload();



As I understand it, NOW returns a datetime. Why am I getting the above error and how do I correct?

Thanks in advance for the help!

Message Edited by TTT on 09-12-200710:02 AM

  • September 12, 2007
  • Like
  • 0