
Hi,
On Ribbion button click I'm opening a HTML webresource having text field. I want to send that textField values in successCallBack function to map somewhere on CRM Form.
for this I'm using Xrm.Navigation.openWebResource(url, windowsoption) and it doesnt have callBack().
This is Onprem D365 V90.15
Kindly suggest, your suggestion will highly appreciated.
Hi,
As far as I know, there's no supported way for you to collect data from the Web resource window (opened with openWebResource), so you can react to them with you form script. The only supported way for your Web resource's script to interact with the form is by placing the Web resource directly on the form. By doing this you can use the window.parent reference: docs.microsoft.com/.../supported-extensions
Web resources and IFRAMEs: You can use JavaScript web resources within HTML web resources. IFRAMES configured to allow cross-site scripting, or scripts within HTML web resources included in a form may interact with the documented Xrm.Page or Xrm.Utility methods within the form via the parent reference.
If that is not an option to you, the supported way you might want to consider is for your Web resource to use the WebAPI to update the desired attributes on the form.
Hope it helps.