- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 01:46 AM
I'm trying to update the 'Next AMA Due Date' field in my flow designer based on the following requirements:
- If Enhanced = Date Scoping Completed + 1 Year
- If Moderate = Date Scoping Completed + 2 Year
- If Basic = Date Scoping Completed + 3 Year
I'm trying to implement the requirements with the following code:
However, what I'm finding is that it doesn't update the 'Next AMA Due Date' field with the required date. I ran some logs for the 'scopingCompleteDate' and 'amaRating', but nothing is returning to the logs. I was just wondering if somebody has come across this before and what I can do to resolve it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 04:25 AM
Hi @matthew_hughes ,
If 2nd step is where you are getting the value and it is a look up record, then you should use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 01:59 AM
Hi @Arun_Manoj Would I still need to use getValue or get DisplayValue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 02:03 AM
Hi @matthew_hughes , please use getDisplayValue()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 02:02 AM - edited 03-14-2024 02:04 AM
Hi @Arun_Manoj I've tried the following and it doesn't work:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 02:07 AM
Hi @matthew_hughes ,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 02:08 AM
Hi @matthew_hughes your no where calling the new GlideDateTime() method hence the addDaysLocalTime is invalid.
you need to call glidedatetime API to invoke date methods
after line 9 add the below code
var gdt = new GlideDateTime(scopingCompleteDate);
and in line 17,20,24
add this
gdt.addDaysLocalTime(365);
gdt.addDaysLocalTime(730);
gdt.addDaysLocalTime(1095);
Harish