I have a Custom Object
Application__c and to the records of this object I am uploading attachments after logging in to our application. In this scenario it works fine. I am able to upload attachments and view the attachment by constructing this URL
But in our application there is a functionality where when the user clicks on a submit button, the owner of record changes to a Queue.
Once the Owner changes to the Queue, the logged in user can no more upload attachment and throws error
INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY. And the user is not able to even view the file by hitting the url
The solution I am looking for is such that even if the record owner changes to queue, specifically the user who created the record (CreatedBy) should still be able to upload attachments and view the uploaded file, but no other user should have access to perform this action other than created by user.
Please let me know if there is any way by which we can solve this issue.
Any help would be highly appreciated.
Note: I am using connection.js for uploading, can't use apex because of heap size issue.