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
Solved! Go to Solution.
This is a known issue which has come up few times in the past too. It is being evaluated and tracked.
As a workaround you can create duplicate text fields for the address components and use the PBL/ClientAPI script to read values from these into the OOB ones. Workflows can also be used fro data copy.
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/#
This is a known issue which has come up few times in the past too. It is being evaluated and tracked.
As a workaround you can create duplicate text fields for the address components and use the PBL/ClientAPI script to read values from these into the OOB ones. Workflows can also be used fro data copy.
I have also tried that, address fields on order like ship to and bill to address could be bind but for account, I am passing the logical name of the fields and retrieving their values through context.webapi.retrieve method
Thanks for the replies guys!
I'll look forward to this being fixed 😉
@sheldoncopper73 wrote:
I have also tried that, address fields on order like ship to and bill to address could be bind but for account, I am passing the logical name of the fields and retrieving their values through context.webapi.retrieve method
That is interesting solution. Do you mind sharing the code for community reference as this avoids field duplication.
FYI, I have created an Idea/Feature request for this... https://powerusers.microsoft.com/t5/PowerApps-Ideas/Enable-binding-to-OOB-Address-Fields/idi-p/30238...
Hey @HemantG Just wanted to know when will we be the address bug will be fixed.
There's already a final solution for this issue ? For the solution I've been implementing, I can't use any of the workarounds presented here.
Can you please share the solution? I am unable to access the address fields from my control?
Try this way I am able to get address field value
You have pass field logical name as input parameter then use context.webApi.retrieve to get passed parameter value to set value use context.webApi.update
For current entity and recordID
store context in a variable : let _context:any = context(since page is not declared in index declaration file you will get error)
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 |