+ Start a Discussion
TraceyTracey 

Uploading attachments to case

Could somebody provide me with sample code on how to upload attachments to cases in asp or aspx?

 

 

SuperfellSuperfell

Attachment a = new Attachment();

a.parentId = 'the id of the case';

a.filename = 'foo'; 

a.extension = '.bar';

a.body = fileContentsAsByteArray(someFile);

SaveResult sr = binding.create(new SObject [] {a})[0];

if (sr.success)

.... 

TraceyTracey
Thanks for the feedback Simon
esource8esource8

Does anyone know how to do this with PHP?

 

Thanks so much!