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?
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.
It is not about creating an output document. We would like to create multiple work orders from 1 case.
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.
Thanks for the reply, do you have any guidelines to do this?
I haven't worked much with salesforce processes and flows either..
You could try this process automation module on Salesforce trailhead.
This page also starts to explain specifically what these flows are and what they do.
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!