- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2025 07:04 AM
Hi there,
The duplicate worknotes are coming from the fact that your script allows more than one condition to evaluate as true at the same time. Since a single user can have multiple roles, more than one block runs and the work_notes field gets set twice.
A simple way to fix this is to control the flow so only one branch executes. You can do that by using else if instead of separate if statements, or by adding an additional check before writing to work_notes (for example, only update if it’s still empty in that transaction). This way even if the user has overlapping roles, the system will only log one clear worknote.
Keeping it structured like that will keep the logic simple and avoid the duplicates without needing heavy customization.
Hope this helps!
Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.