Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Pass a object between HTML web resource

Posted on by 405

Hi,

Below is the requirement.
TAB A is bind with HTML web resource which call to web service and in return JSON is send back.
Half of the data i need to display in TAB A HTML webresource and remaining need to display in another TAB B which is again bind with HTML webresource.
Please suggest

Thanks
Aniket

*This post is locked for comments

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Pass a object between HTML web resource

    Hi,

    There is one workaround probably , if you create a function  and trigger form load event and then data stored  in a global object. Once you stored the global object then you can access the object using window.parent.CRM_OBJECT.

    I understand that these OBJECT are created in the form onload instead of HTML tab. 

    var CRM_OBJECT = [];
    
    
    function LoadData()
    {
    
        $.ajax( {
                  type: "GET",
                  async: false,
                  contentType: "application/json; charset=utf-8",
                  datatype: "json",
                  url: URLODATA,
                  beforeSend: function (XMLHttpRequest) {
                      XMLHttpRequest.setRequestHeader
    
          ("Accept", "application/json");
                  },
                  success: function (data, textStatus, XmlHttpRequest) {
                      for (var j = 0; j < data.d.results.length ; j++) {                   
                          CRM_OBJECT[j] = {
                              firstName: data.d.results[j].FirstName,
                              lastName :data.d.results[j].LastName
                              
                          };
                      }
                  },
                  error: function (XmlHttpRequest, textStatus, errorThrown) { alert('ODataSelect Failed: ' + textStatus + errorThrown + odataSelect); }
              });
    
        }
    
  • AM-22040756-1 Profile Picture
    AM-22040756-1 405 on at
    RE: Pass a object between HTML web resource

    Reading the post - community.dynamics.com/.../211338

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans