i am updating task in some stage, but it's updating another task also
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 01:39 AM - edited 11-04-2024 02:11 AM
i am updating task1 in some stage, but it's updating all the task's, this is the script i have done.
i need to update only task1 only remain don't need to update
after -Business Rule
condition- state - changes to- pending for dispatch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 04:26 AM
Could you show us the conditions? Its possible that this script is doing fine just updating ONE thing, but there's subsequent updates being handled some other place. You could do a lot of discovery on this by leveraging log statements. This video might help.
https://youtu.be/hleufTixf6E
Second thing, why is this happening AFTER, then you're updating the record?
If you used BEFORE, you could make the alteration to u_hold_the_task without having to process a second transaction on the task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 04:32 AM
Can you elaborate on what you are trying to do? Is this a child task that needs to update when a parent state changes?
Your script looks weird, because you are querying to another table (you say it's a BR, so it runs on 'current') and within your BR you are querying to the wm_task table where the sys_id of the record is the current sys_id. So you are querying to your current record through the wm_task table.
As I don't know your instance, it will be hard to give you the correct logic to put into your script, but I would start looking at what I wrote above.
For triggering the other records: check on any BR's/Flows that do something with mutations on your task. You could always use 'setWorkflow(false)' to ensure you aren't triggering any other updates.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark