+ Start a Discussion
DanielJimenezDanielJimenez 

SalesForceScripting, AppleScript and Attachments

Hello, I'm making a simple automator workflow to upload PDFs to a specific record in SalesForce. Is it possible to use the SalesForceScripting app to upload attachments? I do have it successfully querying and inserting a row in SalesForce, just not sure how to throw the attachment contents in with the insert statement. TIA for any pointers! Daniel
ShanghaiDrewShanghaiDrew

Daniel, I was looking at doing the exact same thing but didn't know where to start (I am not very technical).  If you do get something working, I would really appreciate it if you could share this with me.  Please send to: andrew@quadrantasia.com

SuperfellSuperfell

Currently SalesforceScripting has no support for binary data. As a work around you'd have to read the file and generate the base64 encoded value of it and pass that to SalesforceScripting.

DanielJimenezDanielJimenez
Great, thanks Simon. I will try and do that. On another note, is SalesForce scripting open source? Or will it be in the future? Thanks! Daniel
SuperfellSuperfell

Its not currently open source, i'll look into changing that.

DanielJimenezDanielJimenez
That would be great. I'd love to write some simple automator actions for it, however I guess I could do that regardless of the availability of the source code.
DanielJimenezDanielJimenez
Anyone have any recommendations for base64 conversion in applescript / salesforce scripting? Google shows me lots of "hacky" solutions, if I find a reliable one I'll follow up.
SuperfellSuperfell

I posted the source to Github (not that you need the source to write scripts against it). https://github.com/superfell/SalesforceScripting