+ Start a Discussion
CRMfusion - GWCRMfusion - GW 

Inserting DOCX files via the API

Are there any special considerations when importing a DOCX or XLSX file via the API?

 

For all other file types I simply convert the file to base64 and copy it to the body.  When I do this with DOCX or XLSX the file is corrupt when I try to open it from salesforce (via the user interface).

 

Any ideas?

 

Regards;

GlennW

dbuschhodbuschho

Hello,

 

Hopefully you've already found the answer to this, but for other readers like myself:

If you send fileattachments that may be of the docx,xslx,pptx formats from Microsoft Office, you will need to set the ContentType field on the attachment record in order to have Salesforce serve the record with the proper mime-type.

 

This should only be an issue with IE8 , the other major browsers are unaffected.