We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Can we access the previous object in script action?

PRAVEEN AKULA
Giga Contributor

Can we access the previous object in script action? 

1 ACCEPTED SOLUTION

hvrdhn88
Giga Patron

no you can not access the "previous" object in script action.

Note:  Script actions are triggered by events only.

 

for more details please refer the doc link below.

 https://docs.servicenow.com/bundle/london-platform-administration/page/administer/platform-events/re...

View solution in original post

3 REPLIES 3

Alikutty A
Tera Sage

Hello,

You can access the current object in a script include but I believe you cannot access the previous object in a script action as it runs in the background and not when a business rule executes in the system (Similar to Async business rules).

Thanks!

hvrdhn88
Giga Patron

no you can not access the "previous" object in script action.

Note:  Script actions are triggered by events only.

 

for more details please refer the doc link below.

 https://docs.servicenow.com/bundle/london-platform-administration/page/administer/platform-events/re...

siva_
Giga Guru

Previous object cannot be accessed in any other platform functionality apart from some of the types of business rules (before,after) 

Hope this helps 

 

Thanks

Siva 

Mark this response as correct if that helps