cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OliverFlint
Advocate II
Advocate II

Binding to address fields on contact/account

I'm just playing with the PCF and noticed that I cannot bind properties of my component to the address fields (e.g. address1_line1).

 

I am able to configure address fields on the form to display the control in the UI and that binds the first property. But any other properties after that cannot be bound to address fields on contact/account. I can bind them to other SingleLine.Text fields (e.g. firstname).

 

Is this a limitation or a bug?

 

Cheers

Ollie

15 REPLIES 15

May be I am late here but what we ended up is using the solution from this link : 

 

https://www.magnetismsolutions.com/blog/jaredjohnson/2019/07/04/binding-to-address-fields-in-a-pcf-c...

 

Bind your address fields on the form as single line text and then open XRM toolbox and update them using the link mentioned above.

 

Thanks

 

 

Thanks Manish, I already used the same to resolve binding issue.

 

 

 

 

tdutch
Advocate I
Advocate I

The approach that worked for me was to use the Chrome F12 html editor to edit the options in the listbox that shows the available bound fields. I changed an html option to "address1_line1", for example, and was able to select and save it. No errors and it worked fine. Had to repeat the html hack for all of the address fields.

OliverFlint
Advocate II
Advocate II

For anyone still awaiting an official solution to this issue I have what I believe is a more elegant solution to those mentioned to date via the use of custom events. See my blog post for full details... http://www.oliverflint.co.uk/2020/06/06/PCF-and-Form-Communication/#

View solution in original post

Oliver,

I believe the issue has been fixed and you can attach PCF components to address fields.

The only issue that is remaining seems to relate to address_line2 and address_line3 due to an oversight.
---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

Hi Ben, I was aware of the "partial" fix. However, given it's not actually fixed.... I shared this solution as an example of the use of events to enable forms and pcf's to communicate without the need for extra bound fields, onchange events, prop updates and notifyoutputchanged spaghetti code. Something about having to create fields solely for the purpose of communicating with a PCF goes against most design principles. As soon as I spot that the fix works 100% I'll be updating my Address Lookup control (not holding my breath given it's taken a year+ to get to this point!)

 

Thanks for pointing this out though.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,489)