2

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?

2

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.

enter image description here


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.

enter image description here

2
  • Appreciate the detailed answer. My question was also that - 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?
    – Asif K
    Jul 20 '20 at 1:03
  • It's a good question. I'm not aware of a way to find a list of historically deprecated code. It's really paying attention to that section of the release notes for every release (and then manually searching). Jul 20 '20 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.