sfdc-SupportDevelopment / npsp

Automatically exported from code.google.com/p/npsp
0 stars 0 forks source link

Improperly handled Relationships bulk insert exception #326

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a file to import multiple Relationship records, including one record 
where a Contact ID points to a deleted Contact record
2. Attempt to import this file (examples below are with DemandTools) with a 
batch size >1

What is the expected output? What do you see instead?

Currently, the entire import batch that includes the record with the deleted 
Contact ID fails to import. I would expect that only the single problem record 
would fail to import.

Workarounds: 
1) use a batch size to one (OK for small imports)
2) carefully vet the import list to be sure there are no lookup problems 
(multiple steps involved)

DemandTools log sample:

[every record in the batch that fails looks like this]
2012-02-01T03:13:38-08:00,,"",,Insert,,,,," Message: npe4.Relationships: 
execution of AfterInsert<LF><LF>caused by: System.DmlException: Insert failed. 
First exception on row 116; first error: REQUIRED_FIELD_MISSING, Required 
fields are missing: [npe4__Contact__c]: 
[npe4__Contact__c]<LF><LF>(npe4)<LF><LF> Status code: 13"

[errored records in the batch that fails]
2012-02-01T03:24:17-08:00,,"",,Insert,,,,," Message: entity is deleted Status 
code: 47"
2012-02-01T03:24:17-08:00,Batch Insert,"npe4__Contact__c:003U000000Bgw77IAB  
RecordTypeId:012U00000004zPTIAY  npe4__Type__c:Spouse  
npe4__RelatedContact__c:003U000000BgvW4IAJ  
",npe4__Relationship__c,Insert,,,,,"entity is deleted"
2012-02-01T03:24:19-08:00,,"",,Insert,,,,," Message: npe4.Relationships: 
execution of AfterInsert<LF><LF>caused by: System.DmlException: Insert failed. 
First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields 
are missing: [npe4__Contact__c]: [npe4__Contact__c]<LF><LF>(npe4)<LF><LF> 
Status code: 13"
2012-02-01T03:24:19-08:00,Batch Insert,"npe4__Contact__c:003U000000Bgw8QIAR  
RecordTypeId:012U00000004zPTIAY  npe4__Type__c:Sibling  
",npe4__Relationship__c,Insert,,,,,"npe4.Relationships: execution of 
AfterInsert<LF><LF>caused by: System.DmlException: Insert failed. First 
exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are 
missing: [npe4__Contact__c]: [npe4__Contact__c]<LF><LF>(npe4)<LF><LF>"

What version of the packages are you using?

Relationships 1.52

Please provide any additional information below.

Original issue reported on code.google.com by bender...@gmail.com on 1 Feb 2012 at 11:45

GoogleCodeExporter commented 8 years ago

Original comment by kbro...@gmail.com on 2 Feb 2012 at 6:35

GoogleCodeExporter commented 8 years ago

Original comment by kbro...@gmail.com on 12 Dec 2012 at 10:30