How to set the Due date of RITM and Task same as variable selected in Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 08:57 PM
Hi Community,
I have created a termination form in Service Catalog item , when a termination form is filled by users, there is filed called Effective date (variable is name effective_date) select for the actual termination date. I want to show the same date as RITM Due date and Task due date, however it is not happening currently.
Can someone suggestion how can I achieve the output.
Effective Date Selected is -
RITM Date is showing is
Task Due date is showing is
@Ankur Bawiskar I saw your other post where you have provided solution but that thread is closed, therefore tagging here for help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 09:07 PM - edited 01-24-2023 09:08 PM
Write script after begin activity in workflow as shown below:
var gtd=new GlideDateTime();
grd.setValue(current.variables.effective_date);
current.due_date = gdt.getDate().getDisplayValue();
Regards, Shekhar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 02:47 AM
Hi Shekhar,
Thank you, i have tried script suggested by but still i am not able to display the Due date as Effective date. Due date on task is showing 1 day behind the the actual date of effective date. Refer the screenshot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 06:16 AM
Hi @Naresh_5120 ,
Step 1. Can you try to put a log in workflow
Step 2. Can you check with different users, if it is different then we have to use time zone functions to populate the date
Regards, Shekhar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 09:01 AM
Hi Shekhar,
with script given by you i am able to populate date only on RITM Due date not in Catalog task Due date.