You need to sign in to do that
Don't have an account?
as6
How to deprecate a method?
Hi readers,
I wish to deprecate a method. My method is global. It is in a global class. The global class is included in a managed package.
Yet, when I add @deprecate annotation in front of my method, I get the compilation error:
"Only managed identifiers can be marked deprecated"
I guess, my problem will get solved if I somehow make my method a managed identifier. But, I don't know what is a managed identifier. I searched a lot but couldn't find anything about managed identifiers yet. Please help me out.
For your convenience, I've uploaded the Managed Package containing the class which contains this method.
Installation URL of my managed package is:
https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t900000008vrj
I wish to deprecate a method. My method is global. It is in a global class. The global class is included in a managed package.
Yet, when I add @deprecate annotation in front of my method, I get the compilation error:
"Only managed identifiers can be marked deprecated"
I guess, my problem will get solved if I somehow make my method a managed identifier. But, I don't know what is a managed identifier. I searched a lot but couldn't find anything about managed identifiers yet. Please help me out.
For your convenience, I've uploaded the Managed Package containing the class which contains this method.
Installation URL of my managed package is:
https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t900000008vrj
All Answers
Hey Thanks A_Smith, my package was in Beta version and not in released version. So, my methods and class were not getting deprecated. I uploaded this package again in released mode. Now, I can deprecate the method as well as class.
(Here's the Installation URL for installing the released mode package.
https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t900000008vrk)
Thanks A_Smith for your kind reply. I'm marking your reply as solution.