I have a custom Dashboard and a custom LWC and an Account record Page as shown below.
https://i.stack.imgur.com/8JFeR.png
On Dashboard tab, I have embedded the custom LWC and inside which I have added Dashboard URL as an Iframe but it's not redirecting correctly to the dashboard when clicked on Dashboard tab.
Below is my LWC code
export default class DynamicDashboard extends NavigationMixin(LightningElement) {
@track iframeURL;
@track a_Record_URL;
connectedCallback(){
this.a_Record_URL = window.location.origin;
}
@wire(getRecord, {
recordId: "$recordId",
fields
})
loadFields({error, data}){
if(data){
this.iframeURL = 'this.a_Record_URL/desktopDashboards/dashboardApp.app?dashboardId=01Z4y000001O93MEAS&displayMode=view&networkId=000000000000000';
}
}
}
this.iframeURL
is not populating correctly I believe due to which When I click on Dashboard tab on Account record page it says 'URL is invalid. Please try with correct URL'.
Please help me out on this. I have tried most of the possible alternatives but it's not working.
Please help me out team.
Thanking you in anticipation.
