locked
Unable to get property 'setAttribute' of undefined or null reference RRS feed

  • Question

  • Hi,

    I upgraded CRM 2015 to CRM 2016 by Migrate method - import organization.  Upgrade organization was completed successfully.   But when I select opportunity I got error.  When I debug java script I found it is coming from below script when  load opportunity main form.  This script is using to set the lookup filed of property of parent account in opportunity always to accounts. so the contact will not be selected. 

    Please help me to solve below script which is not working in CRM 2016.   Kindly let me know is there any custom validation tool or legacy check tool before upgrading CRM 2016 or check in CRM 2015.

    Error

    document.getElementById("customerid").setAttribute("lookuptypes", "1");

    TypeError: Unable to get property 'setAttribute' of undefined or null reference

       at Form_onload (testcrm2016/.../Opportunity_main_library.js)

       at eval code (eval code:1:1)

       at RunHandlerInternal (testcrm2016/.../ClientApiWrapper.aspx)

       at RunHandlers (testcrm2016/.../ClientApiWrapper.aspx)

       at OnScriptTagLoaded (testcrm2016/.../ClientApiWrapper.aspx)

       at Anonymous function (http://testcrm2016/SSC/form/ClientApiWrapper.aspx?ver=-1632125718:199:1)


    pnoushu@hotmail.com

    Sunday, March 26, 2017 1:34 PM