- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2022 04:15 AM
Hi All,
I am trying to populate due date on sc_task and also on ritm based on a variable (effective date) in one of my catalog item.
So, when effective date is filled, the same date has to populate on sc_task and ritm
I have written a BR on sc_Tasktable before insert
var effdt=current.request_item.variables.effective_date;
if(effdt != '')
{
current.due_date = effdt;
}
This is making sc_Task due date to set, from here how can I set the RITM due date with effective date.
Please suggest
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2022 04:30 AM
Yes, you can but if it is following the same flow, I think it will be a better idea to keep it in workflow/flow than in BR.
From performance as well as maintainability point of view, if you are building a solution for a specific requirement which caters to particular set of tasks, BR is not a good idea at table level.
Just think from this perspective, your RITM and sctask table grows by a lot over time and this BR will run every time there is a insert and at least has to go through condition checking, whereas in your workflow dedicated for these catalog items, will only be specific for records for these catalog items.
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2022 04:22 AM
Hey,
You can glide the RITM table and populate the RITM.
But why do you want to use the BR, it will be running for all the records and not necessarily all your sc_task will be required to fill effective date field.
I would rather suggest utilize the workflow/flow activities(whichever you are using) to populate the fields for RITM as well as your SC Task.
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2022 04:25 AM
Hi Aman,
I want to apply this only for 3-4 catalog items which are under a category. So, in filter condition I can give the category and can proceed right?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2022 04:30 AM
Yes, you can but if it is following the same flow, I think it will be a better idea to keep it in workflow/flow than in BR.
From performance as well as maintainability point of view, if you are building a solution for a specific requirement which caters to particular set of tasks, BR is not a good idea at table level.
Just think from this perspective, your RITM and sctask table grows by a lot over time and this BR will run every time there is a insert and at least has to go through condition checking, whereas in your workflow dedicated for these catalog items, will only be specific for records for these catalog items.
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2022 04:29 AM
Utilize the workflow itslef
Run Script:
current.due_date = current.variables.effective_date;
Create Catalog Task:
task.due_date = current.variables.effective_date;