Inkey Solution Logo

Power Pages

Display records in PowerApps Portal based on hierarchy of the logged-in Contact

The Client 

For a client based in Australia, we had to display the Accounts, Cases, and Contacts in the PowerApps Portal based on the hierarchy to which the logged-in Contact belongs to. Currently, PowerApps Portal properties provide only the Parent Account of the logged-in Contact. There is no direct way to fetch the records as per the hierarchy of the logged-in Contact. 

The Challenge 

The client needed to display Accounts, Cases, and Contacts in the PowerApps Portal based on the hierarchy of the logged-in Contact. However, PowerApps Portal properties only provided access to the Parent Account of the logged-in Contact, with no direct method to fetch records according to the entire hierarchy. 

The Solution 

The client’s Dynamics 365 Sales environment maintained a comprehensive hierarchy for Accounts. Each Account could have multiple child Accounts, and those child Accounts could, in turn, have their own child Accounts. 

In addition to the out-of-the-box "Parent Account" field, the client was also using a custom Account lookup field to store the master Account of the hierarchy to which the current Account belonged. We leveraged this custom field to fulfill the requirement. Using FetchXML, we retrieved the necessary records and displayed them on the portal’s HTML page, based on both the Parent Account and Master Account fields from the logged-in Contact’s record. 

Other Features 

  • The solution was tailored to respect the hierarchical structure, ensuring that only relevant records were visible to the logged-in Contact. 
  • The approach provided a seamless experience for users, aligning with the existing data model and business rules. 

Result 

The client was able to successfully display records in the PowerApps Portal according to the hierarchy of the logged-in Contact. This enhanced user experience and ensured that the data presented was both relevant and accurate.

Would you like to digitize your business and put it on the cloud?
Do you need clear, concise reports for your organization?