You need to sign in to do that
Don't have an account?
Jameema Thamadapalli
creating opportunity products based on parent Account opportunity product
Hi.. I have a usecase.Createing Opportunity products based on parent Account Opportunity produts.Any suggection on how i can do this?
1. Automated flows
2. triggers
how hard will it be catupre Parent Account,Opportunity Products and add them to Child Account(Opportunity Products).
1. Automated flows
2. triggers
how hard will it be catupre Parent Account,Opportunity Products and add them to Child Account(Opportunity Products).
You could use the below link to call an apex method from a custom button or link that could get the related child records of the parent record and then insert them as a list.
>> https://help.salesforce.com/articleView?id=000325250&type=1&mode=1
Let me know if this helps or in case if there is any question.
Regards,
Anutej
Thank you for the responce, but an looking for a way to add those Opportunity products from parent account to Child Account.
EX: I have a checkbox on Child Account when clicked, It should create Opportunity products on Opprtunity. It should fetch the Opprtunity products based on parent Account Opportunity Product.
Every Account has only one Opportunity in this case.
Whats the best way to achive this?
1. Flows
2.Triggers
3. whats the best practice?
This can be done with the help of the flows as well as triggers. If you go with the flow, the below link can help you:
http://chanukadissanayake.blogspot.com/2019/06/salesforce-auto-generate-renewal.html
You can modify the flow steps as per your requirement.
If you go with triggers, you need to follow the below steps:
- Create a trigger on Opportunity. Context would be after insert
- Check if there is any Parent Opportunity available or not.
- Store the parent opp in a set and query the parent opp along with the child records.
- Now copy the child records into the newly inserted opps
Let me know if you need any further help on this.Thanks,
Abhishek Bansal.
Also, in case if you are using a trigger make sure you are following the best practices so that the implementation is future proof.