How to exclude the sys_id of a current record from a query in a Business rule?

Jesus Nava
Tera Guru

Hello experts please I need a little help, I have a BR that avoids duplicate emails in the sys_user table here it is:

JesusNava_0-1678388055795.png

it is working fine but I need to exclude the sys_id from the current record from the query so that it does not conflict with itself, how can I add that exclusion?

Thank you!

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

gr_til.addQuery('sys_id', '!=', current.sys_id);

View solution in original post

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

gr_til.addQuery('sys_id', '!=', current.sys_id);

Thank you Brad!

You are welcome!