How does multiple page layouts work based on roles, when a resource has all the roles which have dif
Answers
-
OSC determines the right layout to display dynamically based on user, record values, etc. At runtime, this is achieved by evaluating each layout's criteria, from the first layout on top of the list of layouts (by default this is the one created most recently but admin could also re-order layouts to move an older one to the top of the list) to the last layout at the bottom of the list. The very first layout whose criteria are met will be rendered. For example, for a custom object, a "default" with no criteria is created first. Admin clones a 2nd layout for Sales Manager which shows 2 more fields; then a 3rd layout for Sales Admin which shows 10 more fields. In App Composer, the Sales Admin layout is shown at the top, followed by Sales Manager layout, then default layout. If admin doesn't re-order the layouts, this is how it works at runtime for different users:
If a user has only Sales Manager role, the 2nd layout will be the one displayed;
If a user has both Sales Admin and Sales Manager role, because the sales admin layout is the most recent created one, it will be displayed.
The last one, the custom default layout is always there to display when no other layouts' criteria are met at runtime.
5 -
Thank you for the inputs. So there is no way for a user to pick a particular layout when creating a record ?
Regards,
Krishna
1 -
Correct. Picking the right layout is not an end-user task. Admin user should design the various layouts with the right criteria/order to achieve the desired behavior for end users.
2