Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Display the Notes Pane in an html Page

Posted on by 932

Is it possible to show the Notes Pane of Social pane in an HTML page?

Please suggest.

*This post is locked for comments

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Display the Notes Pane in an html Page

    Okay, if you got the answer of your question then please markthe suggestion as helpful an close the thread.

  • Verified answer
    RE: Display the Notes Pane in an html Page

    Yes, but for retrieve the Notes i am unable to fetch the information using webapi.

    So i am using FetchXML.

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Display the Notes Pane in an html Page

    Okay.. I thought you have used the suggestion in your previous post.. which is "using web api to retrieve the account records"

  • RE: Display the Notes Pane in an html Page

    Okay I used XML to retrieve the data.

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Display the Notes Pane in an html Page

    No, it means you are not using Jquery code to call your web API request.

  • RE: Display the Notes Pane in an html Page

    Okay means already we embed the code of JQuery in above code.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Display the Notes Pane in an html Page

    This is JQuery web resource. This is used in the other part of the code which is used to retrive the records. As you already have the code which returns the code, you can ignore this web resource.

  • RE: Display the Notes Pane in an html Page

    what is the use of this line ---->   <script src="../WebResources/raj_jquery_1.9.1.min"></script>

    Which type of content in raj_jquery_1.9.1.min WebResource?

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Display the Notes Pane in an html Page

    Did you check there is a response in that thread which is what you are looking for? i.e. retrieve data and show it in a html table

    Here is an extract. You need to modifiy this as per your requirement-

    ==============

    <html><head>

      <title>Account Services</title>

      <script src="../WebResources/raj_jquery_1.9.1.min"></script>

      <script src="ClientGlobalContext.js.aspx"></script>

      <script type="text/javascript">

          function loadAccountServices() {

              //Get Account Guid

              var accountId = window.parent.Xrm.Page.data.entity.getId();

              //Get Account Services

              var accountServices = getAccountServices(accountId);

              if (accountServices != null && accountServices.length > 0) {

                  var tableData = "";

                  for (var i = 0; i < accountServices.length; i++) {

                      var service = accountServices[i].raj_name;

                      if (service != null) {

                          //dynamically add table data with Service Names

                          tableData = tableData + "<tr><td>" + service + "</td>";

                      }

                      var service1 = accountServices[i].raj_Mobile;

                      if (service1 != null) {

                          tableData = tableData + "<td>" + service1 + "</td>";

                      }

                      var service2 = accountServices[i].raj_Email;

                      if (service2 != null) {

                          tableData = tableData + "<td>" + service2 + "</td></tr>";

                      }

                  }

                  //Create HTML table

                  var table = "<table style='font-family:Segoe UI;font-weight:normal;font-size:13px;text-align:center'border='1'><tr style='height:20px'><td bgcolor='#A9D0F5'>Name</td><td bgcolor='#A9D0F5'>Mobile</td><td bgcolor='#A9D0F5'>Email</td></tr>" + tableData + "</table>";

                  //show table data on the Account form

                  window.document.writeln(table);

              }

          }

          //get Account Services

          function getAccountServices(accountId) {

              var serverUrl = Xrm.Page.context.getClientUrl();

              var oDataUri = serverUrl + "/xrmservices/2011/OrganizationData.svc/raj_accountservicesSet?$select=raj_name,raj_Mobile,raj_Email&$filter=raj_Acc2AccserId/Id eq guid'" + accountId + "'";

             // alert(oDataUri);

              var accountServices = null;

              $.ajax({

                  type: "GET",

                  contentType: "application/json; charset=utf-8",

                  datatype: "json",

                  url: oDataUri,

                  async: false,

                  beforeSend: function (XMLHttpRequest) {

                      XMLHttpRequest.setRequestHeader("Accept", "application/json");

                  },

                  success: function (data, textStatus, XmlHttpRequest) {

                      if (data != null && data.d.results.length > 0) {

                          accountServices = data.d.results;

                      }

                  },

                  error: function (XMLHttpRequest, textStatus, errorThrown) {

                  }

              });

              return accountServices;

          }

      </script>

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

    <body style="word-wrap: break-word;" onload="loadAccountServices();">

    <br>

    <form onload="loadAccountServices();">

    </form></body></html>

    ================

  • RE: Display the Notes Pane in an html Page

    Yes aleady reffered this link.

    Already made an code of preview accounnt information using CRM Rest builder.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans