Hi there, It's the first time I try to import attachments of an object. I see the attachment is not showing in the list of Salesforce fields in the mapping form. What's the way to do this?

My case is -for example- an object called News and Events that has 5 images in the Notes & Attachments in SF. I want to map them to an image file in drupal with ilimited files. What's the way to accomplish this? Could someone point me in the right direction?

Thanks a lot

nico

Comments

nicodv’s picture

Issue summary: View changes

Correct the word "Sealsforce"

nicodv’s picture

My case is: since I don't see an option for custom SOQL queries, and therefore I cannot filter the attachment imports (if I map against Attachment object I'd import hundreds or thousands of files into the site on the first cron run) what's the way to do this? Should I use the previous version of the module?

thanks

kostajh’s picture

Version: 7.x-3.0-alpha2 » 7.x-3.x-dev

As you've noticed this isn't supported in the module currently, and I'm not sure there are plans to as it would be fairly complex to implement.

The simplest way would be writing a custom module that leverages the core Salesforce module and/or the hooks documented in salesforce.api.php. Alternatively you could write a patch to Salesforce Mapping module that would implement a "linked" mapping between two objects.

nicodv’s picture

Im trying to make a simple attachment import but it,s not happening, this error is stoping imports

MESSAGE Invalid data value given. Be sure it matches the required data type and format. Processing failed for entity associated with Salesforce Object ID: xxxxx

Im just mapping sf's body to drupal's image file plus the other required sf fields... Btw: i can map a node's image field to a sf attachment, right? Or must i map drupal file object instead of an image field of a node?

thanks for your help

nicodv’s picture

Could someone help me a bit with this? I finished my project almost a week ago and I cannot find the way to import attachments. The type and format issue pops up every time I try to import an attachment or data from a Salesforce's URL type field.

EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required data type and format. in EntityDrupalWrapper->set() (line 744 of /home/xxx/public_html/sites/all/modules/entity/includes/entity.wrapper.inc).

...being line 744:
public function set($value) {
if (!$this->validate($value)) {
throw new EntityMetadataWrapperException('Invalid data value given. Be sure it matches the required data type and format.');
}

Hope you can point me in the right direction.

Thanks in advance

kostajh’s picture

Title: Import attachments of an object » Support Salesforce attachment sync
Category: support » feature

Attachment imports don't work. There needs to be a conversion between the "file" type of a Drupal file attachment and the attachment format used by Salesforce.

A related issue is linking multiple entities together, because if an attachment is added to a Contact, the attachment field is not available in the SF Mapping interface - you have to set up a mapping between a Salesforce Attachment and a Drupal object to get the field, which means you need a way to link the two mappings so that one Drupal entity syncs with two Salesforce objects (Contact and Attachment).

nicodv’s picture

thanks for the help. is that possible? i mean to map 2 drupal objects to one sf?
also, is there a plan to fix this in the module?

thanks again

nicodv’s picture

Issue summary: View changes

text corrections

aaronbauman’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

7.x is no longer supported

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.