Problem on Page Redirection based on record type

Hi,
I’m Using Skuid Page that override account default detail page now by setting “View” button override with visualforcec page.

I Have added a new new recordtype in account now. I need to redirect user based on record type. I did page assignment suggested skuid document but its not working.

can any one help?

Requirement.
1. user clicks Account standard Tab.
2. Click any existing account to view the details.
3.  Based on recordtype page record the page must show different fields.(pages are already created)

any way?

Thanks,
Sathish

Sathish -

Are you currently in Lightning or Classic?

Page assignments currently only work in Classic.  Lightning support of page assignments is on the roadmap but has not been implemented yet.

You can try assigning Skuid pages via Lightning App Builder, or combine the pages into one Skuid page and use conditional rendering.

Good luck, thanks!
Christine

A few approaches come to mind:

Option 1 - Add all of the elements to your page and use rendering logic to display the fields/components based on the record type.  This can be complicated to maintain, but can be done declaratively.  Tabs are a great way to help keep it organized.

Option 2 - Use tabs with page includes loading your different record type pages and use rendering logic to turn off all but your selected page based on the record type.  The UI should load the first rendered tab for you and you can use css to hide the tab header if necessary.  The benefit of this approach is you can maintain the account pages separately, which can be easier to maintain.  If you need to get into navigating around the tab, here’s an article that provides a high level approach to doing it with a lightweight snippet:

  https://community.skuid.com/t/idea-action-for-setting-tab-in-tabset-hide-tab-menu

Option3 - This one is a bit more advanced, but you could setup a page router.  The way this works is on your primary account detail page, you add a page include and reference a “redirect” page that will be responsible for identifying the record type and loading the correct page back into the same page include.  This requires a snippet to get done.  In the “redirect” page you would setup a model that queries the input account, identifies the record type and kicks off a model action to execute a snippet.  We’re doing this action with a URL with this type of syntax:

javascript:skuid.snippet.getSnippet(‘UpdatePageInclude’)(‘AccountContent’,‘AccountDetail_{{$Model.INTP_Tool_Account_Redirect.data.0.RecordType.DeveloperName}}’,‘Id={{$Model.INTP_Tool_Account_Redirect.data.0.Id}}’);

Here’s the snippet that goes along with it:

var target = arguments[0],
    content = arguments[1],
    query = arguments[2],
$ = skuid.$;

    var pageInclude = skuid.$(‘#’+target).data(‘object’);
        pageInclude.pagename = content;
        pageInclude.querystring = query;
        pageInclude.load();

I’m using classic version. 

There are two different page for each record type but we have standard view button override with visualforce page. if user click on view button the page has to look at the record type and redirect to correct detail page based on record type.