ServiceNow Learning 71: Shortcut way of copy Code in Flow Designers ServiceNow

Shamma Negi
Kilo Sage
Kilo Sage

Hi All,

 

From where to copy the code snippets of flows, sub flows and actions. Here is the shortcut to copy the code snippets from. Please have a look:

 

Getting Code Snippets

Users with the "flow_designer" role or the admin role can get the code snippet for a flow, subflow, or action.

Flows, subflows, and actions need to be published before a developer can get the code snippet. To get a code snippet, click the More Actions button and select the Create code snippet menu item.

 

 
ShammaNegi_2-1700586685431.png

 

 

 

In the Code Snippet to Execute... dialog, click the Copy Code Snippet to Clipboard button to copy the code snippet. Paste code snippets into a script.

 

 
ShammaNegi_3-1700586731179.png

 

Hope this helps.

I hope this article helpful. Please mark it as helpful and bookmark if you like it.

 

Regards,

Shamma

 

Regards,Shamma Negi
2 REPLIES 2

Rafael Batistot
Tera Sage

Hi Shamma, thank you for your post 

I could execute this action and work, but i need setup this part 

inputs['from_address'] = 'email@gmail.com'; // String (Full UTF-8)

The doubt is... I need to run this code with this email specific. I don't want to insert like trigger condition. I need like this as i post

when i copy, where i paste? Where i run this code? 

Thank's advance 


Hey,

 

You can call this in any server-side scripting. like calling it into Business Rule or Script Include.

 

Regards,

Shamma

Regards,Shamma Negi