Add Approval to a Record Producer before record creation

Dan R3
Kilo Expert

I have a situation where I want to use a record producer to allow users to add their own locations to the cmn_location table, however I want to have an approval on submission so we can confirm the record is accurate and appropriate. 

 

What would be the best way to do this? 

 

I don't see an easy way to add an approval to the RP, only by using a SC item and adding a workflow w/ an approval in it...

 

...thought this would be easier then it apparently seems. Maybe the easy solution is going over my head...

 

 

Thanks in advance.

 

Dan R

1 ACCEPTED SOLUTION

No problem!  Actually, the request item table is the only table that associates workflows directly in a reference field on a record.  For the rest of the system you go directly to the graphical workflow editor, create a new workflow, and then specify the table and the conditions for which the workflow should be invoked and bound to a record.  Check out this doc and give it a try.  Again, you'll just specify the 'Location [cmn_location]' table as the table for the workflow.

https://docs.servicenow.com/bundle/london-servicenow-platform/page/administer/workflow-administratio...

View solution in original post

8 REPLIES 8

Mark Stanger
Giga Sage
You can associate a workflow to any table. Just set up a workflow to trigger off of allocation record creation and include an approval activity.

Thanks Mark. Can you be more specific on how this would work? Essentially I want the record producer to add to the cmn_location table, but the workflow would have to be on sc_req_item table, no?

 

In addition I'm having a hard time seeing how the workflow would go... how would it be set up after the approval action if no ticket is necessarily associated with the record producer adding the record to the table?

The workflow would run against the location record directly. No request item is necessary. The ticket would be the approval record itself.

That makes sense. However, it looks like OOTB the workflow field only looks at workflows on the sc_req_item table. (just want to confirm you're suggesting to change this...)

 

This is the reference qualifer: javascript:new SNCCatalogUtil().getActiveWorkFlows('sc_req_item') 

 

Is there another way to apply this without changing the dictionary?

 

Possible for you to provide an example? That may help....

 

Appreciate your responses on this Mark. (signed up for SNGuru mailing list the other day actually 🙂 )