For the first time we’re presenting a vlog from the Desynit Development Team! This is a short video explaining how, if you are using @AuraEnabled Apex with your Lightning Components, you may have a serious permissions problem brewing due to two recent Critical Updates. I also look at how to use features of VSCode and the command line to investigate and edit sections of your metadata.
Please let us know what you think about this new format! I’ve added some notes below if you want to follow up on the content shown in the video.
This is the Bash command I use to generate a text file of the names of all Apex classes with @AuraEnabled methods:
[prism field=Code1]
The command line arguments stand for:
If you’re a Windows user and need to set up Bash inside VS Code, there are instructions here.
Use the following search and replace settings in VS Code to generate the XML for sharing Apex classes in a Permission Set (make sure the Regular Expression option is engaged):
[prism field=Code2]
[prism field=Code3]
Here is the code for the LWC that throws an error if the current User does not have access to it’s Apex Controller (and the relevant Critical Update is engaged):
[prism field=Code4]
[prism field=Code5]
[prism field=Code6]
[prism field=Code7]
Our independent tech team has been servicing enterprise clients for over 15 years from our HQ in Bristol, UK. Let’s see how we can work together and get the most out of your Salesforce implementation.