Automated Test Framework: Dynamic Date field populate via javascript: gs.daysAgo not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2018 03:03 PM
Hi I am having an issue in one of my instances where the Automated Test Framework: Dynamic Date field populate via javascript: gs.daysAgo is not working.
Has anyone experienced this problem before?
Here is an example test similar to the one I am working on but scaled down to only show the problem I am facing. I am using a London instance for this example but it also occurs in Kingston Patch 8.
I am opening a record producer.
Setting a date variable.
Instead of inserting the calculated date value it is inserting the text of "javascript: gs.daysAgo(-3)" into the form when the test is run as illustrated in the example screen shot below.
By contrast, a similar approach works correctly for console forms.
Take the following test that sets the valid to field on a knowledge article.
It correctly sets the date for console based forms.
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2018 03:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2018 04:01 PM
Here is an example test similar to the one I am working on but scaled down to only show the problem I am facing. I am using a London instance for this example but it also occurs in Kingston Patch 8.
I am opening a record producer.
Setting a date variable.
Instead of inserting the calculated date value it is inserting the text of "javascript: gs.daysAgo(-3)" into the form when the test is run as illustrated in the example screen shot below.
By contrast, a similar approach works correctly for console forms.
Take the following test that sets the valid to field on a knowledge article.
It correctly sets the date for console based forms.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2018 09:34 AM
I found out about this, its a known problem! I wouldn't call it a problem, it's just built that way. We had opened an RFE!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2019 05:58 AM
Hi - did you create any type of workaround for this?
I'd like to do something similar where we set a variable on a Record Producer to be 10 days in the future.
Doesn't seem to work by entering javascript in the variable section.
Thanks!