web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Set value on CRM form from html webresource

(0) ShareShare
ReportReport
Posted on by 570

Hi,

I have an html webresource, this opens from the ribbon button click.

I need to set value on the CRM form from this html window, Is it possible through Javascript? 

(Note: Using CRM 2016, Webresource i am opening on ribbon button click, not in IFrame)

Thanks

*This post is locked for comments

I have the same question (0)
  • Verified answer
    ChrisC Profile Picture
    630 on at

    I'm assuming you are opening this webresource as a dialog to get user input and then update some record field(s)?

    In this case I don't think you have a supported reference to the Xrm.Page model for the underlying form to update fields, however you can use the rest webservice to update the underlying entity record.

    With the deprecation of modal dialogs what you really want is to create your own inline dialog like native dialogs, which is possible, but as yet unsupported.

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    I have almost nothing to add to ChrisC's answer except tutorial I wrote for such cases that could be helpful for you - butenko.pro/.../dynamics-crm-2013-step-by-step-creating-dialog-windows

  • Suggested answer
    Community Member Profile Picture
    on at

    //Sets an Opportunity field value to 80 from a JavaScript function written in an HTML
    window.parent.opener.Xrm.Page.getAttribute("closeprobability").setValue(80);

    This will work in Dynamics 365!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans