function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shebin-KVP Business SolnsShebin-KVP Business Solns 

Problem while ensuring field level security in apex class

Hi all,

 

 We are developing an apexchange app. While security review salesforce is asking to ensure field level security for each field updates. problem is that we have thousands of fields to update in all classes which are webservices.Now the number of lines without FLS is about 5-7  thousands, if i add FLS then the code will be double. So what is the best practice for this task and is there any short ways to accomplish the same?

 

Thanks in Advance,

Shebin Mathew,

KVP Business Solutions.

admintrmpadmintrmp

This is odd. You shouldn't need to consider FLS in your code as Salesforce is supposed to handle that for you. This is possibly something you should talk to Salesforce directly about. Perhaps set up an office hour, or set up a case regarding their findings. If you have developer support, they can normally explain this further for you, or on the odd occasion, they will remove the issue from the report in the case that the team stuffed up somewhere along the line.

 

From my experience, we have never had to consider FLS when going through security review.

 

What I would check however, is that your FLS is set up correctly in your Profile setup when giving the security review team an org to do the testing on. If they don't have the correct set up, they may have restricted access to your application (and they will not set it up for you).