How to identify if current operation is insert, update or delete in Business Rules?

sanyalshubh
Tera Contributor
 
1 ACCEPTED SOLUTION

Ravi Gaurav
Giga Sage
Giga Sage

Hi @sanyalshubh ,

 

We can use current.operation() in BR. Depending on current operation, it returns update, delete or insert value.

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

View solution in original post

3 REPLIES 3

Ravi Gaurav
Giga Sage
Giga Sage

Hi @sanyalshubh ,

 

We can use current.operation() in BR. Depending on current operation, it returns update, delete or insert value.

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

Ankur Bawiskar
Tera Patron
Tera Patron

@sanyalshubh 

As mentioned there is OOB function available in current object and it gives the operation

current.operation()

what's your business requirement here

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Sandeep Rajput
Tera Patron
Tera Patron

@sanyalshubh operation() method on current object returns the operation type (insert/update/delete)

 

e.g. if(current.operation=='insert')