How to add approvals to record producer?

reddy8055
Tera Contributor

Hi,

I have created record producer on vendor table (core_company) so whenever request is submitted it is created a vendor record. Now is there way we can add approvers before record creation? Also is there a way we can check for duplicate records with same name and prevent creating/updating the record? 

 

Thanks,

 

5 REPLIES 5

Community Alums
Not applicable

Hi @reddy8055 ,

Unfortunately workflows and flows are triggered from record producers once a record is actually created.  So the business service would need to be created first, the workflow/flow would detect that and launch the approval and go from there.  If you want a step in between the creation of the record the service catalog would be the best method to accomplish this where you could have a flow run that initiate the approval and once approved create the business service with the data from the request.

For some reason, you copied @Michael Ritchie response here...https://www.servicenow.com/community/now-platform-forum/adding-an-approval-step-to-a-record-producer...


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Basheer
Mega Sage

Hi @reddy8055 ,

You would need to use some workflow to get the approver before the record creation. Direct record producer to record mapping doesn't allow you approver without record creation.

 

In the workflow itself you can write a script to check if there is a duplicate record and prevent from creating one more.

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

Hi,

In Runscript workflow activity, how can we create a catalog task and automatically close it. And as soon as it closed it should create a record in vendor table and comments should be posted in task. Below script is creating task but do we need to add vendor creation script in same runscript?

 

var gt = new GlideRecord('sc_task');
gt.initialize();
gt.request_item = current.sys_id;
gt.short_description = 'Vendor Record Creation';
gt.setDisplayValue('assignment_group', 'd625dccec0a8016700a222a0f7900d06');
var task_sys_id = gt.insert();

Thanks,