html web resource display like crm grid RRS feed

  • Question

  • hello am retrieving some records and display in html web resource now the requirement is i need to show the records with the hyperlink like crm grid how can i achieve this,plz help as soon as..

    ms crm

    Thursday, August 15, 2013 12:29 PM

All replies

  • Hi,

    please have a look on the following link, may it helps:


    Best regards


    Steve Sämmang, Vienna, Austria
    Blog: xrm.io Website: simplic.at

    Thursday, August 15, 2013 1:41 PM
    <BODY onload="document.getElementById('fetchinput').value = getFetchXML();resultRender.submit();">
    <SCRIPT type=text/javascript>
        function getFetchXML() {
            var strXML = '<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="contact"><attribute name="contactid" /><attribute name="fullname" /><order attribute="fullname" descending="false" />';
            strXML += '<filter type="and"><filter type="and">';
            if (parent.Xrm.Page.getAttribute("new_lastname").getValue() != null) {
                strXML += '<condition attribute="lastname" operator="eq" value="' + parent.Xrm.Page.getAttribute("new_lastname").getValue() + '" />';
            if (parent.Xrm.Page.getAttribute("new_postcode").getValue() != null) {
                strXML += '<condition attribute="address1_postalcode" operator="eq" value="' + parent.Xrm.Page.getAttribute("new_postcode").getValue() + '" />';
            if (parent.Xrm.Page.getAttribute("new_address_line1").getValue() != null) {
                strXML += '<condition attribute="address1_line1" operator="like" value="%' + parent.Xrm.Page.getAttribute("new_address_line1").getValue() + '%" />';
            if (parent.Xrm.Page.getAttribute("new_phone").getValue() != null) {
                strXML += '<filter type="or"><condition attribute="telephone2" operator="eq" value="' + parent.Xrm.Page.getAttribute("new_phone").getValue() + '" />';
                strXML += '<condition attribute="mobilephone" operator="eq" value="' + parent.Xrm.Page.getAttribute("new_phone").getValue() + '" /></filter>';
            strXML += '<condition attribute="statecode" operator="eq" value="0" />';
            strXML += '</filter></filter></entity></fetch>';
            //   alert(strXML);
            return strXML;
    <META content=NO-CACHE http-equiv=CACHE-CONTROL>
    <FORM id=resultRender method=post action=/AdvancedFind/fetchData.aspx><INPUT id=fetchinput type=hidden name=FetchXml> <INPUT value='<grid name="resultset" object="2" jump="lastname" select="1" icon="1" preview="1"><row name="result" id="contactid"><cell name="fullname" width="150" /><cell name="address1_line1" width="160" /><cell name="address1_line2" width="100" /><cell name="address1_postalcode" width="70" /><cell name="birthdate" width="80" /><cell name="mobilephone" width="100" /><cell name="telephone2" width="100" /><cell name="emailaddress1" width="180" /><cell name="parentcustomerid" width="100" /></row></grid>' type=hidden name=LayoutXml> <INPUT value=contact type=hidden name=EntityName> <INPUT value={00000000-0000-0000-00AA-000000666400} type=hidden name=DefaultAdvFindViewId> <INPUT value={00000000-0000-0000-00AA-000000666400} type=hidden name=ViewId> <INPUT value=1039 type=hidden name=ViewType> <INPUT value=fullname:1; type=hidden name=SortCol> <INPUT type=hidden name=UIProvider> <INPUT type=hidden name=DataProvider> </FORM></BODY></HTML>

    This is a html page using fetchxl. I have making the fetchxml based on values of fields for contact searching. First try this on any entity. Once it is working than change the entity according to your requirement

    Regards Faisal

    Thursday, August 15, 2013 3:01 PM
  • Hi,

    I need to use custom grid to display data .So i tried the above code.

    Added the above code in HTML Webresource but finally ended with the below error.

    Could you help me with this


    Thanks in advance

    Thursday, September 11, 2014 2:29 PM