-2

I have 10 record types, I want to display different page layouts for different recordTypes. In standard we can do this but i am using vf page. How can i show diff layouts for diff pages..?

3
  • 1
    What about page layout assignment? – Sergej Utko Jun 9 '15 at 6:30
  • 1
    Is your VF page using the apex:detail to consume page layouts, or is it a full custom page ? – Samuel De Rycke Jun 9 '15 at 7:01
  • It is full custom page. – Vijay Kumar Jun 9 '15 at 7:23
1

you can use "apex:detail" tag in vf page to show detail page. I think it must respect your page layout settings.

1

On VisualForce pages you cannot use the'standard' Page Layout Assignment settings, since that only works with standard page layouts. Also if you use a VisualForce page, there's no use adding or removing fields from the standard page layouts, since you define the page layout in your VisualForce page.

Therefore you need to add conditional rendering to make the one VisualForce page behave in different ways for each Record Type. So what you need to do is add a 'rendered=' attribute to your inputfields, where it checks the recordType and based on that renders the inputfield or not.

Let me know if this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.