Introduction
PowerApps Component Framework has numerous methods that are useful to developers in several ways. In developing one of my PCF controls, I ran across a case in which entity colors were required in our control.
I obtained this using the conventional method of calling the getEntityMetadata() for the respective entity and obtaining the EntityColor from it.
let metadata = await context.utils.getEntityMetadata("account"); let entityColor = metadata.EntityColor;
However, this leads to sending requests to the CRM as it is asynchronous, which usually degrades the performance of our PCF control.
Solution
In this case, the getEntityColor method comes to the rescue, where no request is sent to CRM. Thus, enhancing the performance of our PCF control. This method can be found in theming under context.
context.theming.getEntityColor(entityName);
Using the above method, we can get the entity color in HEX format as we add them in customizations.
As shown in the below screenshot, we…
Source link
More About This Author
-
Inogic is one of the leading Microsoft Dynamics 365 ISV since 10+ years. Its flagship product Maplytics™ is a market leading certified (CfMD) geo-analytical mapping app. Maplytics empowers Dynamics CRM users across industries with the power of geographical data visualization, route optimization and along the route search with turn-by-turn directions, appointment planner, locational search by radius and shapes with drill-down filters and color-coded pushpins, heat maps, shape layers & territory management.
Inogic is renowned for its high quality and low-cost offshore development services and productivity apps like InoLink: QuickBooks + Dynamics CRM, User Adoption Monitor, Attach2Dynamics, Alerts4Dynamics Click2Export, Click2Clone, Kanban Board, SharePoint Security Sync, Lead Automation & Distribution, Map My Relationships, Auto Tax Calculator, Subscription and Recurring Billing and Marketing4Dynamics.
Array
- Dyn365CE15 May 2024Effectively manage site security from the Power Platform Admin Center
- Dyn365CE15 May 2024A story of Dental Traumatology using Location data from Dynamics 365 for Optimal Dental Care!
- Dyn365CE14 May 2024Simplify ‘Multilingual Support’ using Dataverse and AI-Translate in Canvas Apps
- Dyn365CE13 May 2024Maximize Dynamics 365 CRM Data Quality with New Features of Inogic’s de-duplicate App!