How to check in business rule whether its a insert operation or update ?

P Das
Giga Expert

Hi All,

Inside a business rule I want to check if it is an insert operation or update. 

current.isNewRecord() is returning false for all the cases. 

Thanks 

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

use current.operation() and it would return insert or update

Regards
Ankur

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

View solution in original post

Aman Kumar S
Kilo Patron

you can use

current.operation();

it will give you values like insert or update based on action

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

use current.operation() and it would return insert or update

Regards
Ankur

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

@P Das 

Did you accidentally marked other response as correct?

The same approach was mentioned from my side as 1st response to your question.

Please mark appropriate response as correct based on timely response.

Regards
Ankur

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

@P Das 

Did you accidentally marked other response as correct?

I could see you marked my response as correct earlier and then switched to other response and marked it as correct.

Just to inform you can mark only 1 response as correct.

The same approach was mentioned from my side as 1st response to your question.

Please mark appropriate response as correct based on timely response.

Regards
Ankur

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

Aman Kumar S
Kilo Patron

you can use

current.operation();

it will give you values like insert or update based on action

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar