Trouble setting DueByDate using Field and Form Rules or API

Trouble setting DueByDate using Field and Form Rules or API

I have a lot of cases where I want to change the Due By Date on a Request to the value in a custom date field. The most obvious is for employee terminations. In some cases we get those several months in advance.

I have a custom Date field named Termination Date and would like to set the Due Date to that so I have the following script set under field and form rules for form submission:

  1. var d=$CS.getValue("GUDF_DATE2");
    $CS.setValue("DUEBYDATE",d);

This doesn't seem to do anything.

As an experiment I have also tried the following, which is copied directly from the custom script help information:

  1. $CS.setValue("DUEBYDATE",new Date("20 May 2015, 15:23:00"));

That also does not change the Due By Date.

I've tried changing it via the REST API and that doesn't seem to work either.

I'm testing with an SDAdmin user so rights shouldn't be an issue. SDP version is 9301.

                  New to ADSelfService Plus?