I need to execute a powershell script onChange or onSubmit of catalog client script

SUHASM
Tera Contributor

Dear developers, 

I have a powershell script which works fine in flow action. However, I need to execute that snippet in catalog client script as onChange or onSubmit script. By doing that, based on the response of that script, form will be allowed or denied submission. 

I am okay to execute that PS script as a flow action or Script Include or Business rule. 

Could someone please help me here?

Thanks, 

Suhas Marathe 

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@SUHASM 

you can trigger that flow action via script using GlideAjax

syntax here

Scripting with Flows, Subflows, and Actions 

You can also open that flow action, click 3 dots and click Create code snippet and use that script

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