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
Sujit KarandeSujit Karande 

Page layout depending on field value

Hello Everyone,

I have a visualforce page on which I am showing some field depending on opportunity price book

Let's say, if Pricebook is the USA, the field will be  Newyork, California etc

And if Pricebook is the UK, the field will be London.

Remember, I have only one visualforce page and using isReneded function to display the field depending upon price book.

Now my problem is, currently I have only one Page layout which shows all the field, like Newyork, California, London etc after submitting visualforce page data.

And now I have created 2 separate layouts for 2 different price books (i,e USA, UK).

I would like to know, how should I trigger the page layout depending on price book? I want to show USA fields on the USA page layout and UK field on UK layout after submitting same visualforce page data.

Any help or suggestion will be really appreciated.
 
Saravana Muthu 8Saravana Muthu 8
Hi,

I am not that much master in coding but i think you can create record type to separate the layouts and render based on record type.

Please refer this link - https://success.salesforce.com/answers?id=9063A000000p4o2QAA

Please mark it as best answer if it helps.

Thanks,
Saravana