Business Rule to change Due Date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2023 01:46 PM
Hello Everyone,
We have a current requirement for Due Date on Tasks be set to match a field called Target Date on the Request Item. I've tried different options for Business Rules but none have worked for me so far. Is there anyone who has a proper script for this or knows the best way to achieve this?
Thanks in advance
Gemma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2023 08:11 AM
I think you need to add correct Due date field in list layout.
As you said you have to created new Due Date field then can you add that field in list layout using gear icon ?
also take a note you business rule runs only after due date changes as you defined that in conditions of BR, so this new due date will only be populated once BR gets executed
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2023 09:42 AM
Yes @sushantmalsure It was a simple list layout issue. thank you.
Do you think the condition needs changes to something more efficient to ensure it is executed correctly? If so what would you suggest?
Last question, I promise, is it possible in the script I have to allow the due date to be changed after it is set? Unfortunately they just provided that part of the requirement to me today. Currently when the due date is changed on the sctask it is always reverting back to the original due date that matches request item target date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2023 11:10 AM
In the Propagate Business Rule that updates Tasks after the RITM is updated, you could simply add a condtion within the while loop and only update sc_task if the previous value of the RITM date is the same as the date on the sc_task. That way, if the date on the sc_task was changed, the RITM update will not affect it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2023 01:30 AM
is it possible in the script I have to allow the due date to be changed after it is set?
Yes its possible, but do you really want it is the main question .
I assume thats how you want it.
So you have 2 business rules
1.on sc_req_item to copyover due date from RITM to task ( this runs on every update on RITM when target date is not empty)
2. on sc_task to make sure due date set on task is always from RITM
Now if you want to have sc_task to have due date from RITM just first time then change 2nd BRs 'when to run ' to just 'after insert'.
and same for 1st BR which is present on RITM just when to run to 'after insert'.
By this way you will set the task's due date when its getting created/inserted and NOT after that as its allowed to change.
You may want reverse to happen like when tasks due date changes you way want same to be reflected on RITM then BRs logic needs to be modified but do let us know in that case.
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2023 06:59 AM
@Gemma Jacobs If I solved your issue. can please you accept the solution to close the thread?
Regards,Sushant Malsure