cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to create a SFM button that generates multiple Work Orders from 1 case

Grill Chef
Grill Chef

Is it possible to create a SFM button that generates multiple Work Orders from 1 case

We have a process that generates a case from another object called FCO. In this FCO there might be multiple applicable Installed Products that need this FCO.

From the FCO the case is generated and the applicable installed products are being mapped to applicable products for that case.

Now I would like to have a button to generate a Work Order from that case for every applicable installed product on that case.

Is this possible and if so, how?

Re: Is it possible to create a SFM button that generates multiple Work Orders from 1 case

Hi Sjef,

Great question. It is not recommended to use a single sfm to generate several output documents. You may be able to code around some of the css to be observed depending on conditions. Modifying and maintaining the code may also become an obstacle as changes in some areas can affect the entire document.

We recommend creating a separate output document for each.

Thanks,

ChrisM

crt_chrism​

0 Likes
Reply
Grill Chef
Grill Chef

Re: Is it possible to create a SFM button that generates multiple Work Orders from 1 case

Hi Mikutel,

It is not about creating an output document. We would like to create multiple work orders from 1 case.

Any thoughts?

Thanks,

Sjef

0 Likes
Reply
Staff Chef
Staff Chef

Re: Is it possible to create a SFM button that generates multiple Work Orders from 1 case

Hi


You could achieve this using apex code to query the applicable installed products on the case and create work orders for them. The code could be initiated only after you use your button to set a flag on the case to identify it as requiring work orders creating. 


If you wanted to do a config option then have you explored Salesforce Processes and Flows? I haven't worked with them much but they may hold a solution. 


~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
Grill Chef
Grill Chef

Re: Is it possible to create a SFM button that generates multiple Work Orders from 1 case

Hi Richard,

Thanks for the reply, do you have any guidelines to do this?

I haven't worked much with salesforce processes and flows either..

Thanks!

0 Likes
Reply
Staff Chef
Staff Chef

Re: Is it possible to create a SFM button that generates multiple Work Orders from 1 case

You could try this process automation module on Salesforce trailhead. 


https://developer.salesforce.com/trailhead/module/business_process_automation


This page also starts to explain specifically what these flows are and what they do. 


http://developer.financialforce.com/customizations/salesforce-flow-tool/

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
Highlighted
Grill Chef
Grill Chef

Re: Is it possible to create a SFM button that generates multiple Work Orders from 1 case

I think I solved it. I created a new SFM from the object FCO that creates a Case and in the related list below I added Work Order. This maps the applicable products to the Work Order and creates a work order for every item on saving the record.

Seems to work great!