An action's inline script may be missing from the compiled snapshot if a user without one of the roles admin, scriptedit, or flow_designer_scripting is the first to trigger that action or trigger a flow calling that action.  This will happen for an action imported with an update set because such an action will need to be compiled to a snapshot the first time it is executed.  The error will not occur if a user with one of the roles mentioned above is the first to trigger and cause compilation of the action.

Steps to Reproduce

1. Import the attached update set which contains an action "DEF0165894_action" with a log step where the message is a inline script "return 'Hello world!';" and a flow "DEF0165894_flow" that calls the action.

2. Edit the user Abel Tuter and add roles sn_problem_read and sn_problem_wite. Alternatively create a new user with just those roles.

3. Impersonate Abel Tuter or other user without roles needed to create script (admin, scriptedit, or flow_designer_scripting).

4. Create problem with problem_statement = DEF0165894 to trigger the flow from the update set. The action is now compiled just-in-time as the user who triggered the flow who does not have the role needed to create script.

5. Go to the flow execution in the ops view and check the message input to the action log step. It is blank when expected to be "Hello world!".

Now that the action is compiled it will be missing the inline script for every user who triggers the flow no matter the roles. To fix the issue the action must be recompiled as a user with one of the roles needed to create script.


After importing an action, log in with a user that has at least one of the roles admin, scriptedit, or flow_designer_scripting and then open the action in flow designer and change something, undo your change and then publish it which will cause the snapshot to be compiled immediately.

Related Problem: PRB1444063

Seen In

SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - Policy and Compliance - Madrid 2019 Q2

Intended Fix Version


Fixed In

New York

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-11-03 15:22:33