1

I have two questions here:

  1. Is it possible to skip the record type selection box in Lightning? I have already done user settings(Default Record Types). The record type box is properly skipped in Classic Mode via this setting. However, It has no effect in Lightning.

  2. How can I pass recordtype via PageReference Parameters in Lightning?

I have created a custom VisualForce Page for Record Type selection (Since I didnot want all record types to be visible). I pass the recordtype ID like this in my controller method:

    PageReference pageRef = New PageReference('/' + result.getKeyPrefix() + '/e'+ '?nooverride=1');
    //Pass RecordType ID
    pageRef.getParameters().put('RecordType', recordType);
    pageRef.setRedirect(true);
    return pageRef;

It works fine in classic mode, however, in Lightning, it is picking up a random record type (not even Default one) and showing the corresponding screen.

Am I missing something here?Kindly help.

  • 1
    As far as I know, Pagereference navigation is not supported in Lightning. – Adrian Larson Aug 18 '16 at 13:10
  • Ok..actually you can call it a visualforce page only where I have used lightning UI elements like modal box , to give it a look and feel of lightning. And it is rendering perfectly fine in Lightning. So, navigation is fine. Just that it takes no parameters :( – dolly kansal Aug 18 '16 at 13:35
  • So, it's still being used in Lightning? Or is this still in Classic? – Caspar Harmer Aug 18 '16 at 21:59
  • I am having same issue. Can you please share the solution if you were able to find any ? – Shraddha Jan 23 '17 at 17:41

Your Answer

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

Browse other questions tagged or ask your own question.