0

I have a "Lightning App Builder" "Record Page" that I've used "Assign as App Default" to make it the page that opens when a specific object type is viewed.

I would like to route to the same page when the "New" action is used but see no way to do that. Is there a way?

(In the object's "Buttons, Links and Actions", I do see separate "Lightning Experience Override" settings for New, Edit, View but these only allow the selection of a "Lightning Component" not a "Lightning App Builder" page.)

1

No, and doubtful it would ever be this way, because App Builder record pages are all built around the idea that the data is already there and cannot auto-adapt to the scenario of creating a new record.

  • So is a work-around perhaps to add lightning:actionOverride Lightning Component for "New" that inserts a record and then routes somehow to the record page? – Keith C Feb 26 '18 at 15:45
  • I suppose you could do that? But it breaks the normal behaviour that "New" does not cause a DML insert until you click Save. There are a lot of standard elements that are inapplicable to a "New" scenario like related lists. Perhaps it is better to put an actual create UI (maybe using the new Lightning:recordEdit Base Components that simplify it, or Lightning Data Service) in your "New" override, and include only the items from the record page that make sense to have on a "New" form. – Charles T Feb 26 '18 at 16:12
  • For my situation - something like the start of a flow interview - I've gone with a create of the record then a "e.force:navigateToSObject" done from a "lightning:actionOverride,force:hasSObjectName" component. Thanks for your comments. – Keith C Feb 26 '18 at 19:16

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.