Error Dynamics CRM Connector: Object Reference Not Set To An Instance Of An Object

Error Dynamics CRM Connector: Object Reference Not Set To An Instance Of An Object

book

Article ID: KB0078927

calendar_today

Updated On:

Products Versions
TIBCO Cloud Integration - Connect ( Scribe ) -

Description

The Object reference not set to an instance of an object error is generated when TIBCO Scribe® Online detects an unexpected error, for which it cannot determine a cause. If you receive the following error when using the Dynamics CRM Connector, there are several common causes that could explain it.
 
Error in calling – Update, Insert, Update Insert
An unexpected error occurred.
The following error has occurred in the Dynamics CRM Connector: Object reference not set to an instance of an object.

In most cases this error occurs when data is being mapped to fields that are normally controlled by the Target application.  In Dynamics CRM, the most common occurrence of this error, is when a NULL, blank, or invalid value is mapped to a field of type GUID. Confirm that all mapped fields of type GUID contain valid data. GUID fields referencing a parent entity (i.e. ownerid, customreid) must contain a CRM GUID for a valid parent record. Also, when mapping a parent GUID field, you need to map the record type field (i.e. owneridtype, customreidtype). In TIBCO Scribe® Online. see the field description (by hovering over the ?) for more details.

Typically, GUIDs are assigned to records by the Target application as those records are created. Often GUIDs are not even visible in the User Interface.

When mapping data in TIBCO Scribe® Online or TIBCO Scribe® Insight, there is the ability to map data, with GUIDS included, to fields that are not visible to the user and are normally controlled by the Target application. For instance, a Customer or Contact would have a record in both the CRM and ERP applications.  In the case of a Migration, the GUIDs used on the old or current system may need to be retained in the new system for record matching during future updates.  In these situations, Maps and DTS files must write GUIDs in fields that users may never see when logged into the system.  If a TIBCO Scribe® Online Map or TIBCO Scribe® Insight DTS file looks up a GUID and returns a Null value, TIBCO Scribe® tries to map the Null value to the GUID field in the Target.  Often, the Target generates a generic error, such as, An unexpected error occurred.

If you see one of these errors, check the following:
  • Block or step type that is noted in the error
  • GUID fields or anything else that the user does not see in the Target Application’s User Interface.
  • Formulas and Source field with which the Map or the DTS is generating the GUID.
    • Review to determine what would be the result of a Null value being generated.
    • Consider revising the formula such that when an error is detected the formula either maps an acceptable default value or a unique value that will generate a different error message.

See also: Dynamics CRM Connector Error: Unable To Insert

Issue/Introduction

The Object reference not set to an instance of an object error is generated when TIBCO Scribe® Online detects an unexpected error, for which it cannot determine a cause.