0

We have two custom apps: a Search app and a Custom360 app.

The Search app provides a list of customers and their opportunities to the agent. Selecting a customer creates a custom URL in code which calls the Custom360 app and includes the account Id. An example of how the URL is formatted is below:

https://testsandbox.lightning.force.com/lightning/n/Custom360Tab?customerid=001XXXXXXXXXXXXXXX

When this URL was fired, the Custom360 was updated and the InIt functions captured the Id from the URL and used it to populate the app.

In Summer 21, the app is not being refreshed when the URL is passed. So we have a situation where the customers Id is in the URL as expected but the body of the app is not refreshing. This means the InIt function does not fire and the previous customers details persist on screen.

Manually refreshing by pressing enter on the URL or pressing F5 resolves the issue, meaning the code still works as intended but the app itself is not refreshing unless the user forces the page to.

Confirmed not a browser issue; persists in other browsers and in different sandboxes and production that are still on Spring 21, this issue does not occur.

The Summer 21 doc mentions no change in Lightning that would explain this, aside from a warning that DOM APIs could change.

Has anyone experienced this problem?

1 Answer 1

0

Add lightning:isUrlAddressable interface to the component.

And also add a "change" handler to handle all changes to the "v.pageReference" value.

Link to Documentation: https://developer.salesforce.com/docs/component-library/bundle/lightning:isUrlAddressable/documentation

<!-- Add an "init" handler to handle the first "v.pageReference" value -->
<aura:handler name="init" value="{!this}" action="{!c.onPageReferenceChange}"/>
<!-- Add a "change" handler to handle all changes to the "v.pageReference" value -->
<aura:handler name="change" value="{!v.pageReference}" action="{!c.onPageReferenceChange}"/>
2
  • isUrlAddressable has already been added. There are multiple embedded child components which are fed from the results of the parent, normally an account Id. While I think adding the change handler has helped, as I see the server call from parent now running when new data is passed through, these changes are not passed down to the children.
    – Don
    Jun 2, 2021 at 8:27
  • In child components, also you have to add change handler to attributes passed from parent to child. Jun 2, 2021 at 16:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .