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

Custom Buttons and Page Layouts

Hi All,


I have a custom object called CMCs__c which has multiple page layouts. I have a custom button on a related object (Service_Agreement__c)  to create a new record. Is there a way in the parameters of the custom button to define which page layout is used? Or is there another way to acheive this?


Thanks in advance for your help.



You can't let a custom button determine which page layout to use.

As page layouts always depend on the record type, it can be done by creating record types which correspond to page layouts and add recordtype indicating parameter in each custom button URL.