This will be a glad news for all salesforce developers who were looking for an apex switch statement for decades to simplify most of the lengthy apex statements. Exactly 10years back there has been an Idea posted on the Idea exchange for this.
I have uploaded an attachment (salesfiorce_migration_guide.pdf) to an opportunity record from classic salesforce. The uploaded document record has the following actions where ‘view’ action is a link to download the file.
Next, uploading another file (router-sample.pdf) to the same opportunity record using upload file functionality in lightning. The uploaded files in the above and current scenario are shown below.
This implementation requires two components. The server communication is modularized into an abstracted component which is then extended to the second component as needed. Continue reading →