Tuesday, 2 August 2016

CRM 2015 - Window OnLoad Unable to get property 'value' of undefined or null reference

We recently had a problem where we were receiving the following error in a single environment only.


Due to it only occurring in one environment I presumed it was a deployment issue.  However I was incorrect.

We were receiving the above error because we restored a full database from one environment to another.  We had some JavaScript which was checking the owner of a record.  The owner was displayed on the record however it was from an external domain.

Because of this it threw an error right down in the CRM depths at:-

function crmForm_window_onload_handler(eventObj,eventArgs){

  try{

    var eContext=Mscrm.FormUtility.constructExecutionObject(eventObj,0,null,null);

    eContext=Mscrm.FormUtility.constructExecutionObject(eventObj,0,null,eContext)

    loadInsideView();

    eContext=Mscrm.FormUtility.constructExecutionObject(eventObj,1,null,eContext)

    CEI.Initialize();

  } catch(e) {

    displayError('window', 'onload', e.description);

  }


}

So if you see an error occurring like this that did not appear in other environments make sure you confirm that the record you are looking at is correctly mapped to the new domain.

2 comments:

  1. https://www.amazon.in/Whatsapp-Software-Delivery-Marketing-whatsapp/dp/B09GXYLJ17/ref=sr_1_11?dchild=1&keywords=Whatsapp+Bulk+Message+Sender+Software&qid=1632979675&s=software&sr=1-11

    ReplyDelete

    ReplyDelete
  2. SHREE SAI PACKERS AND MOVERS
    #18/3, 30ft road,, sri krishna colony,
    kuduregere main road,, alur post,
    Bangalore, Karnataka 562123
    080736 70915


    Packers and movers bangalore

    Packers and movers bangalore

    We are the top packers and movers in bangalore

    Packers and movers in peenya

    We are the top packers and movers in bangalore

    Packers and movers in koramangala

    ReplyDelete