Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics CRM WebResource Jquery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Guys,

I would like to alter Webresource DOM with Jquery is it possible ? As JQuery is there, but does nothing when I try to alter DOM, as all ather functions works fine.

<html>

<head>
<meta charset="utf-8"></meta>

</head>


<script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>

<script type="text/javascript">
    document.onreadystatechange = function () {
            if (document.readyState == "complete") {
            var Xrm = window.parent.Xrm;
            var currentRecordId = Xrm.Page.data.entity.getId();
            FetchXML(currentRecordId);
            if (typeof($) === 'undefined') {
                    $ = parent.$;
                     jQuery = parent.jQuery;
}

$( '<b>hello</b>' ).appendTo( 'body' );

 

</script>
 
<body>
</body>



</html>

Debugging doesn't show any error, Idea is to fetch related records and show data in custom table ?

*This post is locked for comments

  • Suggested answer
    JohnAnonymous Profile Picture
    JohnAnonymous 5,241 on at
    RE: Dynamics CRM WebResource Jquery

    This should be possible. Maybe add the bold line between before the last bracket to make sure it's executed when the dom is ready. Now it doesn't wait for it.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans