How can I attach a workflow to Record Producer?

Laukik Udpikar
Tera Expert

I don't see any oob way to attach a new workflow to record producer, how can i achieve this?

1 ACCEPTED SOLUTION

@Laukik Udpikar 

As already mentioned it makes no sense adding workflow to record produer.

Please don't touch any OOB component such as the one you removed the advanced ref qualifier from the dictionary.

It might break in future upgrade and may lead to issue.

Instead add the workflow on the target table of your record producer.

Regards
Ankur

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

View solution in original post

12 REPLIES 12

Pranav Bhagat
Kilo Sage

Hi

You cant attach a workflow to a record producer,you have to write the workflow for the target table.

eg if you have record producer for incident

 

then write a workflow for incident table.

 

So to run a workflow, you would need to do it within the workflow properties by selecting the target table or selecting a target table and a condition to run it.

Regards

Pranav

Ankur Bawiskar
Tera Patron
Tera Patron

@Laukik Udpikar 

you cannot attach workflow directly to record producer.

you will have to attach workflow to the Target table of that record producer

Regards
Ankur

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

Hi Ankur,

I was trying out few things, and removed this advanced reference qualifier from the dictionary

javascript:new SNCCatalogUtil().getActiveWorkFlows('sc_req_item')

and added the workflow field on the record producer form.

I'm still facing some issues with my workflow script but I think the workflow is attached now, I don't want to go against the best practices

what are your thoughts on this?

Thanks,

@Laukik Udpikar  - The workflow field in record producer will not attach the workflow. If I get it correctly you are able to trigger it based on the record producer workflow field? please clarify.