Whenever i was trying to upload records, I received the below error.
Attempting to update (as part of an upsert) parent field Account__c with new value XXXXXXXX, current value is XXXXXXX
Can any one help me to understand and solve this error?
Whenever i was trying to upload records, I received the below error.
Attempting to update (as part of an upsert) parent field Account__c with new value XXXXXXXX, current value is XXXXXXX
Can any one help me to understand and solve this error?
Take a look at the help doc here: Error: "INVALID_FIELD_FOR_INSERT_UPDATE:Attempting to update (as part of an upsert) parent field"
Knowledge Article Number: 000073334
Description
You may encounter a Salesforce customer getting an "INVALID_FIELD_FOR_INSERT_UPDATE: Attempting to update (as part of an upsert) parent field" error when attempting to insert / update / upsert records via the API using Dataloader, Informatica, Workbench, Etc....
This error occurs because the customer has mapped values to a parent field, which is not allowed.
Resolution
Please check the mapping file for the API tool, such as the dataloader sdl or the Informatica mapping file. If the customer is attempting to update another object through the relationship field, this may be the problem. The resolution for this problem will be to try and update the parent object in a separate job.
Example:
Contact.firstname =Ok!
Contact.Accountid = Ok!
Contact.Account.AccountName = BAD!
Another example: Customer is trying to upsert Agreement__c object and receiving the error "INVALID_FIELD_FOR_INSERT_UPDATE:Attempting to update (as part of an upsert) parent field Customer__c with new value 001V000000ALga6IAD, current value is 001V000000AP1wkIAD:Customer__c --".
Resolution: Agreement__c has a master-detail relationship with Account. As part of the upsert Customer__c field was getting updated which is an ID field on Account object. Removing this ID field during upsert was the resolution.
I got the same issue and found that the Reparentable Master Detail was unchecked. so if have a Master-detail and you are trying to reparent the record, you ll get that error. To resolve make sure you checked the Reparentable Master Detail and try again