Salesforce Asked by SF Ninja on October 4, 2021
Is there any way to find code deprecated by Salesforce in an Org codebase?
When does a deprecated code statement start throwing an error?
Example:
Two aura component events aura:doneRendering and aura:doneWaiting were deprecated in Summer’18 release.
However the code statements which were using these, started throwing an error starting Summer’20 release.
—update—
Adding some clarity to my original ask.
How can i find other deprecated code constructs similar to aura:doneRendering or ui namespace components?
Is it only through manual search for every single deprecated component or is there any easier way to do it?
Is there any way to find code deprecated by Salesforce in an Org codebase?
Using VSCode, pull your code/components
sfdx force:source:retrieve -m ApexClass,ApexPage,AuraDefinitionBundle,LightningComponentBundle
Now, you can perform a search (CTRL + Shift + F) for all references to the deprecated method, component, etc across your codebase. To know which these are requires you pay close attention to that section in the release notes every release as I'm not aware of any resource that lists everything.
When does a deprecated code statement start throwing an error?
I don't think we can answer that unless Salesforce provides that information. I'd generally look to stop using methods they deprecated within a year after they call it out in the notes (that isn't based on any standard).
Your example definitely doesn't seem to have any date or information set out by Salesforce, but the notes generally are a bit more specific...kind of.
Looking at Summer '20, for example, you can see there's deprecation of aura components and they specify they won't end support for the components until May 1, 2021. I highlighted the part where they say you can keep using it afterwards, but won't accept support cases for them after that date. I'd take that to mean they could break at any point after that.
Answered by Kris Goncalves on October 4, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP