on 08-26-2014 2:18 PM
Hi;
I am working on determining the first day and last day of the week using a javascript rule, so this can be in turn passed to an Agentry date and time property. When I debug in the ATE, it seems my javascript rule is always returning zero. What could I be missing, please see below the rule implementation. I am using this rule on a transaction property, under the "Initial Value" attribute - before data entry:
What could my rule be missing, How could I implement this correctly?
Much appreciated!
Sizo Ndlovu
Tags edited by: Michael Appleby
On your lines with a braket (ie { or } ) pleased include the other one, just Commented out like:
{ /* } */
and
/* { */ }
Stephen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stephen;
I have done as you advised, but I seem to be still getting a zero returned, please see below:
The Javascript method return variable (curUnixTime -: as shown on the first screenshot), is it automatically returned onto the WeekEnd property or there is extra code/steps that I need to add?
Thanks and Regards;
Sizo Ndlovu
Hi;
I have managed to get the Javascript portion working and calculating the current week end dates, the day and month are correct, except for the year. When I debug the rule via the ATE, I am getting the right week start and week end dates, only with the year 2045 instead of 2014. Please see the screenshot below:
Suprisingly, when I take the epoch values from the debug.log file and convert these to actual date and time, the return value has the correct day, time and year (2014), unlike what is being returned by the rule in the ATE. What could possibly be causing this?
Thanks and Regards;
Sizo Ndlovu
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.