Project/Project Task : How to trigger action after automatic updates on date fields?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 07:52 AM
Hello Community!
We have an internal constraint to report project Go Live date to tasks linked to Project.
So we have created a custom field on project table : Go Live Date.
This field is automatically aligned with the Go Live Task - Planned Start Date.
The problem we have is, when the Go Live task Time Constraint is set as ASAP, our action to automatically align task.start_date to project.go_live_date is not working.
After an update on project date and with some debugging, I've noticed that whatever my order is (100, 1000, 100000), the Planned Start Date is never updated before my Business Rule to update Project Go Live Date runs, always after.
Do you know if there is any event, action or whatever that can be launched after the calculation of project dates?
Thanks a lot!
- Labels:
-
Project Portfolio Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2023 03:38 AM
Hello @Fabien Henriot
Based on the information provided, it seems that you are experiencing an issue with updating the Planned Start Date of a task in ServiceNow when the Time Constraint is set to ASAP. Specifically, you have created a custom field on the project table called Go Live Date, which is automatically aligned with the Go Live Task - Planned Start Date. However, when the Time Constraint for the task is set to ASAP, your Business Rule to update Project Go Live Date runs before the Planned Start Date is updated.
One possible solution could be to modify your Business Rule to include a check for whether or not the Time Constraint is set to ASAP before updating the Project Go Live Date. This way, if the Time Constraint is ASAP, you can delay updating the Project Go Live Date until after the Planned Start Date has been updated.
Another option could be to use a Scheduled Job or Event instead of a Business Rule to update the Project Go Live Date and ensure that it runs after any calculations of task dates have been completed.
It's also worth noting that there may be other factors affecting this behavior, such as dependencies between tasks or other business rules that are interacting with these fields
Thanks
Amarjeet Pal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 02:45 AM
Hello Amarjeet,
thanks a lot for your time, you perfectly understood my requirement.
I thought about these options, but what I miss is : how to trigger these action (business rule, event..) after the date calculation.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 02:51 AM
Hello @Fabien Henriot ,
To trigger a Business Rule or other action after the date calculation has been completed, you can use ServiceNow's "After" business rule event. This event triggers the business rule to run after all other record updates and calculations have been completed.
Here's an example of how you can use the "After" event in a Business Rule:
1. Open the Business Rule that you want to modify.
2. In the Advanced tab, locate the When field and select "after" from the dropdown menu.
3. Save your changes.
By setting the When field to "after", your Business Rule will be triggered after all other record updates and calculations have been completed, including any date calculations.
Thanks,
Amarjeet Pal
Please mark helpful for the Reponses
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 03:06 AM
Thank you for your time, I already tried 'After' business rules, even with high order (100, 10000, 100000). Each time the date were calculated after.
I put some screenshot for reference, the business rule, the data before an update, the data when the update is being performed (debugger on), and the data once the update is done and business rule has run.