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

Hi Pradeep,

I've added the workflow field on the record producer form, configured the same field and removed the advanced reference qualifier "javascript:new SNCCatalogUtil().getActiveWorkFlows('sc_req_item')" *attaching the image below

wrote a WF Create task script on Incident :

var caller = gs.getUserID();
current.caller_id = gs.getUserID(); - this is not populating yet
current.short_description = producer.ri_short_description; - This is getting populated from the record producer
current.category = producer.ri_category; - This is getting populated from the record producer
current.description = producer.ri_description; - This has some issues not related to workflow i think, maybe another script that i need to change

 

As short description and category are mapping on the form I think the workflow is attached.

find_real_file.png

 

find_real_file.png

Thanks for the update @Laukik Udpikar . Most likely the workflow is getting attached from the target table. As for the scripting that is not working, can you please reproduce this in a personal dev instance and ONLY share instance URL with me so that I can look into this issue for you.

 

- Pradeep Sharma

@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

Hello @Ankur Bawiskar - How can I add the workflow on the target table of my record producer? Are you able to provide the steps: 1, 2, 3, etc.? I have a record producer "Create Incident" that whenever the user selects 2 specific variables, e.g. "Business Service = Shipping" & "Location = Building X", I want it to auto-assign to the "Shipping - Building X" assignment group. Any other variable selections should continue to auto-assign to our Help Desk team. Is this something that is possible or should I accomplish this a different way?

@Laukik Udpikar 

Let me know if I that answered your question.

If so, please mark appropriate answer as correct & helpful to close the thread.

If not, please let us know if you need some more assistance.

Regards
Ankur

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