I'm trying to create a Flow where it will get Child Opportunities of a Parent Opportunity, iterate thru each Opportunity Product (which is the junction object that connects Products & Opportunity) and add all those Products to a new Opportunity. This is to help Users, so they don't have to manually add individual Products on to a new Opportunity (and reduce errors from manual entry).
However, in the Flow I can't Get Records of the Child Opportunities, there's no field. There is a custom Parent Opportunity field on the child and on the Parent Opportunity there's a related list of view of Child Opportunities, but there's no clear way to get the related Child records from the Parent. Has anyone dealt with a similar situation? And is using a Flow the best method or would it be easier using Apex?
Besides the obvious of getting the Account ID of the Parent Opportunity, get all Opportunities associated with the Account, then sort Opportunities by matching the Parent Opportunity ID, then get all Opportunity Products and put them in a collection variable, then create new Products for the new Opportunity, and save the record. I'm hoping there's a straightforward and easier way, but not sure. Thought I'd ask around.
Bradley Weller (Fast Slow Motion) Forum Ambassador
For your Get Records, you should be able to select the name of your Lookup Field to Parent Opportunities on the left side of your filter, and on the right side select the ID of the Parent Opportunity, which is likely recordId if this is a Screen Flow launched from the Opportunity object.