0

I'm working on a lightning communities implementation where we want to drill down from the Case object to a list of related objects. The related object list is pretty heavily customized, so we aren't using any out of the box functionality.

The spec is that the user should be able to navigate using the back button on the related object list page and go back to the case detail.

Since we are using the Case detail page to get the recordId parameter, what I initially tried was creating a custom page and including the parameter of the parent recordId in the url (e.g. /s/case-lines?recordId=12345679). Navigating here via force:navigateToUrl takes me to the page, but the init function doesn't succeed because there is no ID.

If I reload the page, however, the parameter is picked up and the components work as expected. That isn't the best user experience, though.

What would be a better approach to this kind of use case, where we want to drill down into a record's child objects and load a new page?

  • Did you create an object Page for each of the related child object(s) in your communtiy? (i would recommend that approach, and using the navigation events are you already are) – glls Apr 4 '18 at 21:10
  • I'm not sure if I follow you. I could create object pages, but how would that work in terms of showing a page with the recordId of the case in the url and using that as the basis for a query for child objects w/ that case as parent? For what its worth, the way I decided to go is to use the aura:locationChange event and just add a '#caselines' hash. This seems to be working. – api-testuser45690 Apr 5 '18 at 12:53

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.