+ Start a Discussion

How to Create a Case off of the Child Record

We are very new to Visual Workflow and are wondering if the following can be done.

We have an object related off of the Opportunity called ObjectA. When the user goes to the Opportunity there are multiple ObjectA records and they need to create a case off of each ObjectA (which is the child record). So we want to create a visual workflow button where a case is  automatically created (with all required field filled in) on all related ObjectA records of that Opportunity.

Is this possible?
ShashankShashank (Salesforce Developers) 
This is possible using visual workflow. You can create a custom button on the opportunity and add a flow to be launched from it.

In the flow,
1.) Use "fast lookup" element to get a list of ObjectA records for this opportunity.
2.) Use "loop" element to go through the list of records, populate each sobject variable with the case details, insert these sobject variables into an sobject collection.
3.) Use "fast create" element to create these cases in one go.

This is a good tutorial on flows:  https://developer.salesforce.com/en/events/webinars/Flow_Automating_Business_Clicks