- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2024 04:41 AM - edited ‎07-09-2024 04:42 AM
Hi
i need to trigger a notification through business rule when assignment group is one of US ER, US AR, US PR and once triggered when we changed assignment group between these three it should not trigger notification
and once changed from US Tier to either if these groups again it should trigger notification
so i have done scripting in business rule but however when changing between these groups the notifications still triggering, please help to resolve the issue
@Dr Atul G- LNG @Sandeep Rajput @SN_Learn
FYI sys ids used in code
US ER-99cb7eb61b243300ce6996002d4bcb5e
US AR-ddcb7eb61b243300ce6996002d4bcb5f
US PR-55cb7eb61b243300ce6996002d4bcb5d
US Tier-d9cb7eb61b243300ce6996002d4bcb6f
Pasting the script here
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2024 05:10 AM - edited ‎07-09-2024 05:12 AM
I wasn't asked, but still my two cents: I think the issue is in your or conditions against the 'is not'. These will always return true. If "A is not 1 OR A is not 2" it will return true on 1 (because it is not 2) and on 2 (because it is not 1) and on 3 (because it is neither). Replace your 'ors' (||) with 'ands' (&&) and I think it will work, assuming the sys_id's are all correct and you have put all the possible transitions in there.
EDIT: just the 'ors' within the brackets of course, not in between them.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2024 05:10 AM - edited ‎07-09-2024 05:12 AM
I wasn't asked, but still my two cents: I think the issue is in your or conditions against the 'is not'. These will always return true. If "A is not 1 OR A is not 2" it will return true on 1 (because it is not 2) and on 2 (because it is not 1) and on 3 (because it is neither). Replace your 'ors' (||) with 'ands' (&&) and I think it will work, assuming the sys_id's are all correct and you have put all the possible transitions in there.
EDIT: just the 'ors' within the brackets of course, not in between them.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2024 12:16 AM
This worked for me
and in the same business rule i need to add in the script if additional comments or work notes are updated, notification should not trigger, so can i do in the same script?