Error for creating/updating record with a relation

Jun 16, 2015 at 3:20 PM
Edited Jun 16, 2015 at 3:20 PM
Hi,

I get a error when i start a import with related field, maybe i miss some in the configuration?
System.NullReferenceException: Object reference not set to an instance of an object.
   at IntegrationTool.Module.WriteToDynamicsCrm.Execution.EntityMapper..ctor(EntityMetadata entityMetadata, DataMetadata dataMetadata, List`1 mappings, List`1 picklistMappings)
   at IntegrationTool.Module.WriteToDynamicsCrm.Execution.RelationSetter.SetRelation(String relationMappingLogicalName, Entity[] sourceEntities, IDatastore dataObject, Dictionary`2 relatedEntities)
   at IntegrationTool.Module.WriteToDynamicsCrm.WriteToDynamicsCrm.WriteData(IConnection connection, IDatabaseInterface databaseInterface, IDatastore dataObject, ReportProgressMethod reportProgress)
   at IntegrationTool.ApplicationCore.SubFlowExecution.WriteDataToTarget(IDatastore dataObject, RunLog runLog)
   at IntegrationTool.ApplicationCore.SubFlowExecution.Execute(RunLog runLog)
   at IntegrationTool.Flowmanagement.FlowManager.bgw_DoWork(Object sender, DoWorkEventArgs e)
I hope you can help?
Coordinator
Jun 17, 2015 at 11:30 AM
Hi epellegrom,

could you please provide me the following informations:

Please describe the relationmapping:
SourceColumn3 (any samplesourcedata) --> (CrmAttribute i.e. firstname) CrmAttributeType (i.e. text, picklist, date etc...)
SourceColumn7 (any samplesourcedata) --> (CrmAttribute i.e. lastname) CrmAttributeType (i.e. text, picklist, date etc...)

If possible:
Screenshot of the relationmapping

I require these informations to be able to reproduce it in my system.

Br
Peter
Jun 17, 2015 at 1:43 PM
Hi,

Yes sure here a description:
I've Excel file with:
ID Name Active Type
0114 Stad Gent 0 BD
0233 Maas 0 DE

The field Type is a relation the import tool should find the matching record in CRM and sets the guid, if i'm correct.

So i've the mapping:
primkey: ID (123) -> new_eqt.new_eqtid, text
Name(Stad Gent) -> new_eqt.new_name, text
Active (0) -> new_eqt.statuscode, picklist

Then the relations tab for only 1 field on the crm attribute "new_eqttypeid" (lookup to new_eqttype):
Type(BD) -> new_eqttype.new_name (text)

Regards,
Erik
Coordinator
Jun 17, 2015 at 4:56 PM
Hi Erik,

you're right, there was an issue... should have run the unit tests :-/
Anyway it is fixed now. Please let me know, if it works for you?

Br
Peter
Jun 17, 2015 at 7:29 PM
Hi Peter,
Thanks for the quick response! yes unit tests.. you have them, that's the biggest step ;)
Can you create a downloadable version for the new version? I will test it asap!
Regards,
Erik
Coordinator
Jun 18, 2015 at 7:44 PM
Hi Erik,

sorry for the late reply. I was not able to upload a working version to codeplex :-/

Please find the latest version here:
http://www.freedevelopertutorials.com/download/integration-tool-v1-9/

Nonetheless, please let me know, if it worked for you.
I'm looking for someone giving feedback to me and requesting features. Would you be interested?

Br
Peter
Jun 24, 2015 at 7:50 AM
Hi Peter,

Thank you for the update, updating/creating the relations works now! Great!
Yes sure i'm interested to give feedback..

Regards,
Erik