function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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!