Rollback Catalog Task Revert Reason field in email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 09:58 AM
Team,
I am working on an enhancement that needs to rollback to the 1st catalog task if the IP address is wrong. When the 2nd catalog task is generated and the fulfillment team see's the IP Address entered is wrong the team wants to close skip the 2nd catalog task and rollback to the 1st catalog task with the 'revert reason' details sent in the email notification as to why.
The rollback of catalog task works as expected, but the 'Revert reason' data doesn't show up in the email notification. My guess is the rollback activity removes it since tasks needs to restart.
My question is - is there a way to get the 'revert reason' data (single line text field on sc_task table)? I currently have an event task in my workflow to kick off the email notification.
Thanks for any assistance to getting this to work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 10:49 AM
Have you tried a BR to replace current with previous for that field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 10:52 AM
Do you mean instead of having the event task in the workflow. I could possibly try a BR to get the previous data before the task/tasks are rolled back?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 10:56 AM
Leave your build as is, but add a Business Rule to sc_task with an advanced script:
if (previous.u_revert_reason != ''){ //or you could try this in the BR's Condition
current.u_revert_reason = previous.u_revert_reason;
}
You might want to play with the Condition so it doesn't run more often than it needs to.
If that doesn't work, maybe you can do something with the workflow.scratchpad. Let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 11:40 AM
No luck with getting the revert reason data into the email notification. I tried the BR as an onBefore update and onAfter update. I even placed the event trigger in the BR.