- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 07:53 AM
I have requirement where i have the requirement to set due date on RITM & Requests. I tried to achieve it using Business Rule ( Before, Insert) and used below code. But somehow it is not working.
var gd = new GlideDate();
gd.addDays(4);
current.u_estimated_time_of_delivery = gd;
var gdt = new GlideDateTime();
gdt.addDays(4);
current.due_date = gdt;
Any suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 08:25 AM - edited ‎02-14-2024 09:23 AM
It would not be good practice to have a Business Rule set the Due Date, since it should be dynamic and related to the specific Catalog Item.
Instead I would recommend you use a flow to set this value. You can use Transform Functions to do the calculation without scripting:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 08:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 08:26 AM
My Apologies.. But it doesn't seem to work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2024 08:25 AM - edited ‎02-14-2024 09:23 AM
It would not be good practice to have a Business Rule set the Due Date, since it should be dynamic and related to the specific Catalog Item.
Instead I would recommend you use a flow to set this value. You can use Transform Functions to do the calculation without scripting: