0

I have three page layouts (PageLayout-A,PageLayout-B,PageLayout-C) in Opportunity.

I have create a Custom button and after clicking this button it will call custom visual force page and Apex Controller.

Now every time this button will open the page having fields for PageLayout-B.

Please let me know , how can I address this

1 Answers1

0

Page layouts are shown based on "what's this particular record about" (record type, if it's enabled on your Opportunities) and "who's looking" (user Profile; idea being that a Sales Rep might need all fields but a Marketing Manager will need only a handful, Service Technician will need yet something else).

So - it works as designed? What's exactly your question? Some way to select different layouts using apex/visualforce? Not sure if that's possible... If you want something like that you might have to hand-craft whole VF page to show all fields depending on some parameter passed in the URL for example. That's going to be "fun" task... and you'll have to update the page every time you add new field.

eyescream
  • 18,088
  • 2
  • 34
  • 46