MS CRM Returns the Error "Object reference not set to an instance of an object"

Document created by paul_pasko Employee on Aug 23, 2012
Version 1Show Document
  • View in full screen mode
     An update to an MS CRM Object (for example, Account) produces this error message and does not update the record(s):
      
     "Object reference not set to an instance of an object" 
     Microsoft provides instructions on How to Enable Tracing in Microsoft Dynamics CRM at the following link in order to obtain more details from the tracing logs:
      
      
     The tracing logs should give a more detailed error.
     For example, if this error occurs when updating the Account object, this more detailed error may appear in the tracing logs:
      
     System.NullReferenceException: Object reference not set to an instance of an object.
     at SWPlugins.AccountPreCreateUpdate_v2.SetAccountNumber(DynamicEntity& de)
      
     This error may appear cryptic at first, but what it is saying is that the SetAccountNumber operation is failing due to a Null reference Exception.  It is failing because it can not update the AccountNumber with a null value.  
     First, make sure a value is being populated in the xml profile document xml for AccountNumber.  If a value does not exist, then one will need to supplied and mapped.
     Secondly, if a.value exists in the xml profile document, then check to see if there is a workflow in MSCRM that automatically generates an Account Number when a Type field or another field is changed (like a trigger).  If the workflow exists in MSCRM and is still active, disable the workflow so that it does not interfere with the Boomi process.

Attachments

    Outcomes