Setting datetime field as date.now() when other field changes (in a case)

Hi there,

I have two related fields in a case detail screen - case_root_cause and case_root_cause_datetime. I am trying to set the datetime field to date.now() when the case_root_cause field is changed to be no longer empty. I tried to do this by using the OnChangeScript for the case_root_cause as this:

if(this.value != ''){
case_root_cause_datetime.value = date.now();
}

The code hasn't worked but I suspect it can't be far wrong? Has anyone done anything similar before.

Any help or advice would be massively appreciated.

Thanks,

Paul

Parents Reply
  • 0 in reply to Vega

    One of the things that I want to do is a review of the client side API. There are a set of functions related to dates and times that are included in Sage CRM screens but these are not documented and they are not part of the Client Side API.  If you were to log a case requesting that the API be expanded to include date handling functions and ask that that be escalated to Dublin as a request I would be very grateful.   (Requests that come from partners and customer get scored differently!)

Children