locked
FetchViewer' is undefined RRS feed

  • Question

  • Hi All,

    unable to load below script in MSCRM2013.

    Kindly suggest the any alternate option for same. Getting "FetchViewer' is undefined" error when i debug the javascript into VS2013.


    function loadInitialScreening()
    {

    //For InitialScreening
        window.fetchSubmittedRecords = new FetchViewer("IFRAME_InitialScreening");
        fetchSubmittedRecords.WithParentContext = true;
        fetchSubmittedRecords.EntityCode = 10013;
        fetchSubmittedRecords.FetchXml  = getFetchXmlForInitialScreened();
        fetchSubmittedRecords.LayoutXml = getLayoutXmlForInitialScreened();
        fetchSubmittedRecords.Entity    = "new_screening";
        fetchSubmittedRecords.QueryId   = "{CB754987-F467-43BA-B890-45898847CE38}";
        fetchSubmittedRecords.RegisterOnTab(2);
    }

    function getFetchXmlForInitialScreened()
    {
    return '<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"><entity name="new_screening"><attribute name="createdon"/><attribute name="new_submitted"/><attribute name="new_selected"/><attribute name="new_stage"/><attribute name="new_interviewed"/><attribute name="new_emailsent"/><attribute name="new_candidateplaced"/><attribute name="new_stage"/><attribute name="new_status"/><attribute name="new_initialscreenedon"/><attribute name="new_presubmittedon"/><attribute name="new_consultantid"/><attribute name="new_nondisclosureattached"/><attribute name="new_placement"/><attribute name="new_phonestatus"/><attribute name="new_usernotes"/><attribute name="new_screeningid"/><order attribute="createdon" descending="false"/><filter type="and"><condition attribute="new_screeningsid" operator="eq" uitype="opportunity" value="' + crmForm.ObjectId + '"/></filter><link-entity name="contact" from="contactid" to="new_consultantid" visible="false" link-type="outer" alias="new_screeningnew_consultantidcontactcontactid"><attribute name="address1_city"/><attribute name="address1_stateorprovince"/><attribute name="telephone1"/><attribute name="telephone2"/><attribute name="new_ranklist"/><attribute name="mobilephone"/><attribute name="createdon"/><attribute name="new_workstatus"/></link-entity></entity></fetch>';

    }


    function getLayoutXmlForInitialScreened()
    {
    return '<grid name="resultset" object="10013" jump="new_name" select="1" icon="1" preview="1"><row name="result" id="new_screeningid"><cell name="new_consultantid" width="120" /><cell name="new_stage" width="50"/><cell name="new_screeningnew_consultantidcontactcontactid.new_workstatus" width="50"/><cell name="new_screeningnew_consultantidcontactcontactid.address1_city" width="100" disableSorting="1"/><cell name="new_screeningnew_consultantidcontactcontactid.address1_stateorprovince" width="30" disableSorting="1"/><cell name="new_screeningnew_consultantidcontactcontactid.telephone1" width="100" disableSorting="1"/><cell name="new_screeningnew_consultantidcontactcontactid.telephone2" width="100" disableSorting="1"/><cell name="new_screeningnew_consultantidcontactcontactid.mobilephone" width="100" disableSorting="1"/><cell name="new_status" width="60" /><cell name="new_usernotes" width="150"/><cell name="new_emailsent" width="50"/><cell name="new_screeningnew_consultantidcontactcontactid.new_ranklist" width="50" disableSorting="1"/><cell name="createdon" width="60"/></row></grid>';
    }

     

    Wednesday, January 7, 2015 4:14 PM

All replies