You need to sign in to do that
Don't have an account?

upsert attachment with relationships from command line
Hi Guys.
I am using the data loader command line to copy data from external system to salesforce.
I have two objects in salesforce, as well as external system, media and attachement. media is parent, attachment is child.
In the attachment mapping file, the relationship item is
Media__c\:Parent\:ExternalID__c
so that the attachment could be inserted with the relationship of media.
But I got error message
mapping is invalid: MediaId => Media__c:Parent:Ext
ernalID__c
I also tried Parent\:ExternalID__c as well, got similar error message.
Note: I have uploaded the Media data with extenal Id successfully.
How should I specify the mappings?
Thanks in advance.
Hi,
There is no external ID field defined on Attachment object. The ID field will be used for matching.
So there is no way to upsert attachment.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
All Answers
Hi,
There is no external ID field defined on Attachment object. The ID field will be used for matching.
So there is no way to upsert attachment.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
You can use upsert on the Attachment object, but only on the Salesforce ID field of the attachment. You cannot use upsert with an own (External ID) field, because you cannot create custom fields on the attachment object.
To bypass this, you could write a trigger on the Attachment object, to check if the record already exists. If it does you can throw an error, and handle that error on the uploading side of your logic.