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:11 PM
you can use workflow run script activity for this
Remember you have date field but target field is date/time so you need to add time also
current.setValue('due_date', new GlideDateTime(current.variables.effective_date) + ' 23:59:59');
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 02:49 AM
Hi Ankur,
Really appreciate your help, i have tried to run the script but not getting the effective date as due date in Catalog Task.
Below is the screenshot of of workflow, I am running this script in Catalog Task. I am a missing something here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 02:51 AM
please share script
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 03:40 AM
Hi Ankur,
Below is the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 05:29 AM
so what date it's setting?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader