Flow designer scripted approvals not working

Priya75
Tera Contributor

Hi All,

 

I am creating a flow for a table(x_nose_ap_infringemnet) , so i have kept the trigger point :-when the approval field is changed to Approval after this i am sending the record sys_id to action which is taking input as sys_id and it is calling a script include from there and sending back the approval group sys_id..it could be multiple or single. 

 

Action (called after trigger)

var record=inputs.a2precord; //sys_id from flow 

var group = [];

var getApp = new Infg_AprrovalMatrix();

group = getApp.getApprovals(record);

output.approvalList="ApprovesRejectsAnyG["+group+"]" //also getting the sys_id from the script include

 

 

the Approval is generated but the approval doesn't wait for approval or rejection . the Ask for approval output shows :- state as skipped. how can i make it wait for it? WhatsApp Image 2025-12-02 at 19.30.41.jpeg

 

 

 

 

9 REPLIES 9

Priya75
Tera Contributor

WhatsApp Image 2025-12-03 at 10.34.01 (1).jpeg

@Priya75 

this seems to be some other error.

did you try to clear instance cache using cache.do and then try again after logout and login?

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

Glad to hear you were able to make progress on the approvals.

 

This error points to an issue with mismatched input types. It sounds like it was expecting the format to be a Gliderecord object. Its possible the value passed into the field was either null/empty or not the correct format it needs.

 

If that doesn't sort it out, then double check your connection and make sure its setup correctly.

 

Jennifer Metz
Sr. ServiceNow Developer | Infosys

Sandeep Rajput
Tera Patron
Tera Patron

@Priya75 Could you please check if there are active users in the approval group?

yes, users are active. When i create a new record in the table the approval is getting triggered but the logs of flow designer show no approval was created and it skips the approval,rejection part.