In my recent work for a client, there was a need to upload a file to a case not as an attachment but upload under Files Section. As you are aware, Salesforce Files are replacing Attachment. In this post, I am sharing the code end to end for your reference. In this case, I created …
Tag: Apex
Permanent link to this article: https://salesforcebuddy.com/2020/06/upload-a-file-to-salesforce-file-from-lightning-component/
Jan 25
Record is read-only : Trying to update in after insert trigger
If you have encountered this error while working on Triggers. This is because once you are in an after insert/update trigger and the records are read only in that context as they have been written, but not committed, to the database. Unfortunately your trigger is relying on the ids of the records, which means you …
Permanent link to this article: https://salesforcebuddy.com/2019/01/record-is-read-only-trying-to-update-in-after-insert-trigger/