- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 11:01 AM
Is there a way we can set the Due Date on the requested item to be equal to a date variable the user is entering? From what I read, the map to field feature is only available for record producers and it's currently not available for catalog items. Any suggestions would be appreciated.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 11:15 AM
Hi Hernan,
Create a business rule on sc_req_item table with order 1000 and before. Add condition item as your catalog item name.
write a script as below:
if(current.variables.<<date_variable>>)
{
current.due_date = current.variables.<<date_variable>>;
}
Thanks,
Giri Guntoju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 11:07 AM
Hi Hernan,
You need to write a before insert business rule on the requested item table to achieve this requirement.
The script would have this single line
current.due_date = current.variables.due_date_variable; //replace with your variable name
Thank You
Please Hit Like, Helpful or Correct depending on the impact of response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2017 05:53 AM
Were you able to check this out?
Thank You
Please Hit Like, Helpful or Correct depending on the impact of response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2017 10:03 AM
Not yet, I will give this a try in a few hours and get back to you. Thank you for your feedback.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2018 10:19 AM
Hello,
The business rule I am using is below:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
if(current.variables.effective_date.getDisplayValue)
{
current.due_date = current.variables.effective_date.getDisplayValue();
}
})(current, previous);
The variable is a date variable because we would like to avoid using the date/time variable for this catalog item. Unfortunately, because of this, the due date is being set to something like this: 06-18-2018 00:00:00. In my workflow I am using a timer that waits for the due date and it is preventing the timer from working properly. Would you be able to help me to edit the business rule so that it adds time to the due date so it doesn't show 00:00:00?