diff --git a/MobileDashboard/README.md b/MobileDashboard/README.md index e70f98c..205139b 100644 --- a/MobileDashboard/README.md +++ b/MobileDashboard/README.md @@ -10,7 +10,7 @@ Let your mobile workers easily see an overview of their data. For example, show 3. Under Permission Set Assignments, click **Edit Assignments**. 4. Enable **Field Service Mobile Dashboard Permissions**. 5. Repeat these steps for all the relevant mobile users. -3. To install the package, click https://login.salesforce.com/packaging/installPackage.apexp?p0=04tB0000000hFeMIAU. +3. To install the package, click https://login.salesforce.com/packaging/installPackage.apexp?p0=04t1Q0000012EomQAE. 4. From the Developer Console, run the script to get preconfigured cards for your dashboard: `DashboardPostInstall.onInstall();` 5. From the App Launcher, find and select **Mobile Dashboard Settings**. 6. Review the details of the cards and change them as needed. diff --git a/MobileDashboard/force-app/main/default/lwc/mainDashboard/mainDashboard.js b/MobileDashboard/force-app/main/default/lwc/mainDashboard/mainDashboard.js index cbf0bb5..fe82ec7 100644 --- a/MobileDashboard/force-app/main/default/lwc/mainDashboard/mainDashboard.js +++ b/MobileDashboard/force-app/main/default/lwc/mainDashboard/mainDashboard.js @@ -21,13 +21,12 @@ export default class MainDashboard extends LightningElement { this.queryResult = result; const { data, errors } = result; if (data) { + const allSettings = data?.uiapi?.query['Mobile_Dashboard_Setting__c']?.edges; + if (allSettings) this.populateDashboardSettings(allSettings); if (!this.refreshed) { - this.refreshGraphQL(); this.refreshed = true; - return; + this.refreshGraphQL(); } - const allSettings = data?.uiapi?.query['Mobile_Dashboard_Setting__c']?.edges; - if (allSettings) this.populateDashboardSettings(allSettings); } if (errors) { console.log(JSON.stringify(errors)); diff --git a/MobileDashboard/force-app/main/default/lwc/summaryComponent/summaryComponent.js b/MobileDashboard/force-app/main/default/lwc/summaryComponent/summaryComponent.js index c5d3b8a..5a1aa23 100644 --- a/MobileDashboard/force-app/main/default/lwc/summaryComponent/summaryComponent.js +++ b/MobileDashboard/force-app/main/default/lwc/summaryComponent/summaryComponent.js @@ -34,12 +34,11 @@ export default class SummaryComponent extends LightningElement { this.queryResult = result; const { data, errors } = result; if (data) { + this.setRecordsAndSubQueries(data); if (!this.refreshed) { - this.refreshGraphQL(); this.refreshed = true; - return; + this.refreshGraphQL(); } - this.setRecordsAndSubQueries(data); } if (errors) { console.log(errors);