Implementing Navigation Behavior in AG-Grid Field of Dynamics CRM Field Service Mobile App

15 Views Asked by At

enter image description hereIn our Dynamics CRM Field Service mobile application, we utilize AG-Grid HTML web resources to enhance user interactions. Within the AG-Grid, we've implemented a custom cell renderer to create an anchor tag () that opens a new entity when clicked. However, we're encountering an issue with the navigation behavior upon clicking the back button.

Here's a simplified version of our code snippet:

{ 
field: "msdyn_workorderservicetaskid", 
hide: false, 
cellRenderer: function(params) {
    return (!params.data) ? params.value : '<a href="ms-apps-fs://lsfiregroupuat.crm11.dynamics.com_' + appId + '?tenantId=' + tenant + '&isShortcut=true&appType=AppModule&openApp=true&restartApp=true&forceOfflineDataSync=true&etn=msdyn_workorderservicetask&pagetype=entityrecord&id=' + params.data.msdyn_workorderservicetaskid + '" title="Open Service Task" target="_blank">Open</a>';
} 

}

Upon clicking the anchor tag, a new entity is correctly opened in a new tab. However, when users utilize the browser's back button, the application navigates back to the parent page, whereas we intend for it to return to the page from which the anchor tag was clicked.

When users click the back button after opening a new entity via the anchor tag within the AG-Grid, we want the application to navigate back to the originating page, rather than the parent page. Additional Context:

We are using AG-Grid HTML web resources within a Dynamics CRM Field Service mobile application to display data. The provided code snippet demonstrates how we generate the anchor tag dynamically within the AG-Grid based on data. The issue specifically pertains to the navigation behavior upon clicking the browser's back button after opening a new entity using the anchor tag. How can we achieve the desired navigation behavior?

0

There are 0 best solutions below