Triggering RITM approval from flow desginer

jobin1
Tera Expert

In servicenow i need to create a ui action "Request approve" for "abc" company and once user clicked on ui action it should set RITM OOB field "approval" to Requested then trigger a flow designer flow THEN It should initate a group approval if anyone from group is approved the RITM field "approval" should change to Approved and if anyone rejected the state of RITM field "approval" should change to Rejected

How we can achive this?
note: "while creating a new flow i am not able to slect table as sc_req_item

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@jobin1 

it's platform behavior and you cannot select sc_req_item table in flow as it's not allowed

Flow always has to be configured on Service Catalog Trigger.

I am not getting your use-case why you want to create a UI action to generate approval.

[sc_req_item] Table not available on Trigger of Process Automation Designer 

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

ok what you pointing is correct so will it be possible if i create trigger on Service Catalog and calling the flow from ui action script something like below
ui action script
// Set approval to 'Requested'
current.approval = 'requested';
current.update();

// Start the flow
var flowAPI = new sn_fd.FlowAPI();
flowAPI.startFlow('Request Approve Flow', current, gs.getUserID());


@jobin1 

I don't think so, you can call flow configured as Service Catalog trigger via script

OOTB platform triggers the flow when RITM is generated.

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

Devika3
Tera Guru

Hi Jobin,

You can change the trigger of the flow to service catalog inserted and add this flow into the catalog item's process engine: Flow. Then for changing the Approval field in RITM, you can select the RITM's PPROVAL field from the flow using data picker and set the value as required. The approvals also can be set up through Flow, there are specified Approval actions available OOB. And based on the approver's action you can reset the Approval field value again using data picker.

Please mark this as helpful if it benefits you.

 

Regards,

Devika.