How to create an SC Task page variant in UI Builder to show different views for different user roles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I am working in UI Builder and want to customize the SC Task record page so that it displays two different UI experiences based on the user’s role.
Specifically, my requirement is to:
- Use the same SC Task page, but
- Show one layout/view for User Role A (for example, request fulfillers or agents), and
- Show a different layout/view for User Role B (for example, approvers or end users).
I want to understand:
- Whether this should be achieved using page variants, conditions, or role-based logic in UI Builder
- How to correctly configure the page so that each role automatically sees the intended view when accessing the same SC Task record
- Best practices for maintaining and scaling this approach as more roles or views are added in the future
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Views still govern the layout of the form fields so that's probably what you are looking for. If what you are trying to achieve is similar to views on forms in classic ui then what you want to use is the experience specific view rule: [sysrule_view_workspace]. These apply to form pages and use roles and data conditions offering a little bit more in terms of control than their equivalent in classic.
Variants could be used when the ui would be significantly different in terms of layout or components used and pages without forms. You can create audiences based on roles and use data conditions. Variants also offer a bit of convenience in terms of routing as you don't have to implement the logic in the routing itself but just serve different pages at a route based on properties. See for example in SOW routing to record for the email table will display an email composer page and not a form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Short answer: use page variants with audience conditions for truly different layouts, or the Conditional Renderer component for showing/hiding sections within the same page. I'd go with variants for your use case.
Here's the breakdown:
- Page variants are made for exactly this. Same URL, same page, different experiences per audience. You create a variant, set an audience (role-based user criteria), and SN handles routing the right user to the right variant automatically. Official docs on creating variants and controlling variant conditions are worth bookmarking.
- One thing people miss: you need user_criteria_enabled set to true on the page for audiences to work. Easy to miss, causes a lot of head-scratching.
- If the difference between your two roles is more like show/hide a few sections rather than a totally different layout, check out the Conditional Renderer component (added in Yokohama). It only renders what's needed in the DOM, so it's cleaner perf-wise than just toggling visibility on components. Good deep dive on it here.
For scaling: variants are actually easier to manage long-term than a single page with tons of conditional logic everywhere. Adding a third role = create a new variant, set its audience, done. Vs hunting through nested conditions in one page.
