Hi All, I have a requirement that I'm using HTML "navigateTo" web resource. I have a text field in HTML web resource that I need to update a form field using Webresource "window.parent.Xrm.Page.getAttribute("").setValue();" I have used above function. Getting cannot read null error.
Please help to achieve this
Hi,
In this scenario, it is better to pass data (as parameter) in the NavigateTo function:
This is an excellent post by Andrew Butenko:
Xrm.Navigation.navigateTo – gotchas, tricks and limitations – Andrew Butenko's Blog
Here is another post, which demonstrates how you can use FormContext:
I tried but didn't work for me. Maybe because I'm using navigateTo to call web resource as a POPUP window.
Hi,
Thank you for your query.
window.parent.Xrm is not supported.
Please use formContext in the Web-resource.
Here is a very nice tutorial on this:
https://carldesouza.com/how-to-use-formcontext-in-a-web-resource-in-dynamics-365-power-apps/
André Arnaud de Cal...
292,160
Super User 2025 Season 1
Martin Dráb
230,962
Most Valuable Professional
nmaenpaa
101,156