Use of isPropertyLoading property in PCF Control

InogicDyn365CE2 years ago5 Views



Recently, while diving deep into the newly introduced virtual PCF component, I faced an issue where the PCF control wasn’t loading the data on the 1st load of the page.

Let’s have a look at the issue first. As seen in the below screenshot, I have added our PCF control on the First Name field. Kindly refer to this blog to have a look at it as well. Here you can see that the contact does have a first name, but isn’t being rendered in our control.

PCF control

This happens, because as per my observation the PCF controls end up loading first before the full form is loaded which causes an issue while loading the default values. So to overcome this, I will use a property that is passed through context known as isPropertyLoading.

As per my observation, isPropertyLoading will return true until the form is completely loaded and the context can get actual field values instead of null.

So I will add a conditional rendering based on the isPropertyLoading property. Where I will render our component…



Source link

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
February 2025
MTWTFSS
      1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28   
« Jan   Mar »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...