How to programmatically call UpdateView in PCF using requestRender

Introduction:

If you know Power Apps Component Framework, then you must know the updateView method, which is one of the standard methods of PCF.

The updateView method is triggered only when the PCF control is refreshed or rendered and shows us the updated data on our control.

We work on the dataset as well as field type components in PCF. In the dataset, we usually use context.dataset.refresh to refresh the dataset control, which calls the updateView method. Some users also use setState method to re-render a particular component. However, sometimes it becomes difficult to manage the data in the state.

In addition, on using setState only the component for which the state is changed gets re-rendered while all the other components in the PCF control remains as it is.

We recently had a requirement to refresh a field component. However, there is no appropriate refresh method for field component, which can work as same as context.dataset.refresh method.

So to overcome this limitation,…


Source link

More About This Author

Inogic
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.

Author: Inogic

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.

Share This Post On
Share via
Copy link
Powered by Social Snap