This is for CRM 2016 On-Prem. We use IE 11 because of some crufty in-house "enterprise apps."
If a browsing session is opened by navigating to one of our applications first, and a user clicks on a link in that application that takes them to a CRM entity instance, we open that in a new tab (<a href="..." target="_blank">). When the user edits the entity and presses the Save & Close button, it closes the new tab and thus returns to our application. This is the desired behavior.
However, we also access our applications via nav bar items on various entities such as Opportunities (FYI, PassParams="1" is set for these nav bar items, but I have tested with and without that specified on the nav bar item for the below demo page and it makes no difference). So in that case, the sequence is:
- Open an entity instance in CRM, such as a specific Opportunity, perhaps from an Opportunity view or from a CRM dashboard.
- Click on the nav bar item, opening our custom application (either in a new tab or in an iframe on the same form - doesn't matter for this scenario).
- In our custom application, click on a link that opens a new tab to a different CRM entity instance to be edited, for example, a Contact.
- Edit the instance and hit Save & Close.
- Instead of closing, the tab returns to either a list view of the entity in question (Opportunities, in this case), or, if the original instance in #1 was opened from a CRM dashboard, then returns to that dashboard.
Setting rel="noreferrer" on the anchor in our application to open the second CRM entity instance makes no difference.
To rule out anything in our custom applications I created the following web page, put it in its own web app, and created a new nav bar item on the Opportunity to open it. We get the same behavior. If I open the web page below directly by navigating to it and click the link, it opens the CRM entity in a new tab, and Save & Close closes that tab and returns me to the page below. However, if I open this page via a nav bar item on an Opportunity and then click the link below, Save & Close keeps the new tab open and returns to the Opportunity list (because that's where I opened the Opportunity from).
<html>
<body>
<a href="http://crm/ourorg/main.aspx?etn=loan&extraqs=&id=deadbeef-dead-beef-dead-beefdeadbeef&pagetype=entityrecord" target="_blank">click me</a>
</body>
</html>
Hopefully the above all makes sense and this is something stupid I am missing in the SDK documentation.