-2

enter image description here

enter image description here

String attachmentLinks = '';

if(!commAttList.isEmpty()){ Database.insert(commAttList,false);

} return attachmentLinks;

1
  • What is security scanner, and what are you trying to ask here? If you are facing a code review issue then try to solve it by yourself, google it etc, which will increase your knowledge Commented Nov 20, 2020 at 12:03

1 Answer 1

1

If you are building a managed package, or operating in a context where FLS and CRUD enforcement is required, which seems to be the case because you are using a static analyzer that enforces it, you must write code to validate the user's permission to perform DML operations and to access specific schema elements.

The approach to doing so in Apex is covered well in this Trailhead module, part of a longer trail that is well worth taking on building secure applications on the Salesforce platform.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .