Method removed by critical update: getFieldsDescribes

I have a managed package installed in a subscriber org.

Today I just tried to call some of the packages managed Apex in the subscribers org.

It failed with:

Dependent class is invalid and needs recompilation:
Class.TheManagedPackageNamespace.ClassFromTheManagedPackage: line 498, column 13

Method removed by critical update: getFieldsDescribes: []

This is a Sandbox org on Spring ’17.

Do I need to create a new version of the managed package for this critical update? What critical update is it?

This might be tricky as the packaging org is still on Winter ’17.

The corresponding line from the managed package source:

system.debug(LoggingLevel.Debug, 'X.Y() - getFieldsDescribes:' + Limits.getFieldsDescribes() + '/' + Limits.getLimitFieldsDescribes());

It looks like the Limits method in question was deprecated in Summer ’14, but should have kept working for API 30.0 and earlier. Source

Answer

There’s one available in my org that seems relevant:

Remove Deprecated Limits Method

Update Name
Remove Deprecated Limits Method

Auto-Activation Date
Fri May 19 00:00:00 GMT 2017

Impact Details

Removed the following static Apex methods from the Limits class.

  • getChildRelationshipsDescribes() and getLimitChildRelationshipsDescribes()
  • getFieldsDescribes() and getLimitFieldsDescribes()
  • getFieldSetsDescribes() and getLimitFieldSetsDescribes()
  • getPicklistDescribes() and getLimitPicklistDescribes()
  • getRecordTypesDescribes() and getLimitRecordTypesDescribes()
  • getScriptStatements() and getLimitScriptStatements()

Remove Deprecated Limits Method

Can’t find anything related to it in the Release Notes though, nor can I answer your other questions. Still, this might help investigate.

UPDATE: Salesforce have amended the release notes to include Removal of Deprecated Apex Limits Methods (Critical Update)

Attribution
Source : Link , Question Author : Daniel Ballinger , Answer Author : Daniel Ballinger

Leave a Comment