function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vaibhab ShahVaibhab Shah 

Child opportunity to inherit the layout of parent opportunity

Hey,
I have a requirement where there are 2 record types on opportunity. Say OPR1 and OPR2. There are 2 layouts for these 2 record types.

Now an user creates an opportunity with OPR1 recordtype. If user wants to create a child opportunity from an opportunity with OPR1 recordtype, layout of OPR1 should come during child opportunity.

Similarly if an user tries to create a child opportunity from an opportunity with OPR2 recordtype then the layout of OPR2 should come.

Don't want to show the option of choosing the record type while creating a child opportunity. It should inherit the layout from the parent opportunity

Thnx,
Vai
VinayVinay (Salesforce Developers) 
Hi Vai,

This is not possible to restrict child opportunity based on parent layout,  however you can build page to acheive above requirement and write logic as per your requirement.

Thanks,
Suraj Tripathi 47Suraj Tripathi 47
Hi,
Greetings!

Hi Vaibhab,

You have to override salesforce standard button functionality for that.
Please go to the link, it might help you.
for refer- https://merfantz.com/blog/how-to-override-the-salesforce-new-button/

If you find your Solution then mark this as the best answer. 

Thank you!

Regards,
Suraj Tripathi