+ Start a Discussion
Jayesh Babu A VJayesh Babu A V 

Will deprecated classes raise any security issues?

I submitted my managed package for a security review few days ago. After submitting, I found out that I don't have to use an Apex class in the package. So, I tried to delete that class but couldn't because it was part of a managed package. So, I annotated that class with @deprecated. 2 days ago, I got the result and CRUD/FLS Enforcement issue is raised on this class. Now, the problem is, I cannot edit this class as it throws this error: A class with name was deprecated for this package or this name is already in use, also I cannot delete the class. I went to Salesforce Partner Community and raised a ticket and got the permission to delete the managed classes. But, still I cannot delete the class(I don't know why). So, my question is, if I submit the package for security review again, will it raise the same issue again or ignore the issue as the class is now deprecated?
VinayVinay (Salesforce Developers) 
Hi Jayesh,

If you have marked it as @deprecated, then you can just remove it and delete from the package in the next version, which should resolve the issue.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_deprecated.htm

Thanks,
Vinay Kumar
Jayesh Babu A VJayesh Babu A V
But. i cannot remove it from the package. When i try to delete the class, i am getting this error: insufficient access rights on object id
VinayVinay (Salesforce Developers) 
This error is a kind of dependency issue through a roll-up summary, workflow, process builder, flow, trigger, OWD, sharing rules.  Kindly review if you have enough permission on components used and part of your package.

https://www.infallibletechie.com/2015/02/insufficientaccessorreadonly.html

Thanks,
Gabriel StovallGabriel Stovall
You can’t delete partner accounts, but you can disable them. Disabling a partner account disables partner users associated with the account. We recommend disabling a partner account only if the account was accidentally enabled for community access https://www.myaarpmedicare.review/
Jayesh Babu A VJayesh Babu A V
@Vinay the link doesnt say anything about the class. its all about objects. Also, do u kinow the asnwer to my original question: If I submit the package for security review again, will it raise the same issue again or ignore the issue as the class is now deprecated?