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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Mscrm.Utilities.setReturnValue() discrepancy in UCI and legacy application

(0) ShareShare
ReportReport
Posted on by 45

Hi Community,

Mscrm.Utilities.setReturnValue() which is used to return a parameter from HTML webresource to the code from which it was called to open doesn't seems to be working any more.
It returns an error something like "Microsoft is undefined". Do we have any other way to return back the parameters or am I missing the logic somewhere.
Kindly need some help.

Thank You!

I have the same question (0)
  • GiridharRaju Profile Picture
    45 on at

    Hi Community, 

    Mscrm.Utilities.setReturnValue(returnVal) doesn't seems to be working in HTML webresource. Do we have any alternates or replacements for this.

    Thank You

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    That is the downside of using unsupported code. It may work for sometime but will fail in future updates. I would suggest you to update your code with the supported methods. If you want to update the record, you can use web api.

    Hope this helps.

  • GiridharRaju Profile Picture
    45 on at

    Hi,

    I need to return a value from HTML webresource(a comfirm dialod box) to the code that calls the HTML webresource. How can I do that.

    Thank You!

  • Henry J. Profile Picture
    5,237 on at

    Hello,

    Does that help?

    An HTML web resource added to a form can’t use global objects defined by the JavaScript library loaded in the form. An HTML web resource may interact with the Xrm.Page or Xrm.Utility objects within the form by using parent.Xrm.Page or parent.Xrm.Utility, but global objects defined by form scripts won’t be accessible using the parent. You should load any libraries that an HTML web resource needs within the HTML web resource so they’re not dependent on scripts loaded in the form.

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/webpage-html-web-resources#reference-other-web-resources-from-an-html-web-resource

    Henry

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

News and Announcements

Season of Giving Solutions is Here!

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 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 75

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 41 Super User 2025 Season 2

#3
Pallavi Phade Profile Picture

Pallavi Phade 24

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans