+ Start a Discussion
Jingli Hu 3Jingli Hu 3 

having problem to create attachment in code for a custom object which user only have read permission


We have apex code, API and batch class to create the custom object record and generate the attachment. since apex code is running in system mode. we want to give user only read permission on this custom object. but found out when the code trying to create an attachment for the record, got error. when user has edit permission on the object, creating attachment code is working. But shouldn't system mode care the object and field level permission at all?
Ahmad J. KoubeissyAhmad J. Koubeissy
can you post the error please