4

As the rule says, you have too many parameters. Consider passing in an entire record: @AuraEnabled public static updatestudentProgramDiscount(students_programs__c studentRecord) { try { update studentRecord; } catch(Exception e) { throw new AuraHandledException(e.getMessage()); } } Note: You should use Security.stripInaccessible ...


3

From the PMD link mentioned in your question, you can see that the minimum property value in the rule set ExcessiveParameterList is 4 (screenshot below for ref). This means that if any of your apex method has 4 or more input parameters, PMD will display the rule violation error. IMO, since the input params in your apex method are of different data types, it ...


3

So in Apex Tests, you can use the RunAs feature to do this - basically, create a user in the test, assign a basic profile (the new Minimum Access one is helpful for this), and then assign the permission set, and run the test e.g. Profile p = [SELECT Id FROM Profile WHERE Name = 'Minimum Access - Salesforce ']; User u = new User(Alias = 'standt', Email = '...


1

Probably the most common library out in the ecosystem is the FFLib Apex Common produced by Andrew Fawcett at Financial Force. Related: blog post. Or you could use the newish System.Security class methods


1

That means the user does not have access. In order to a User have access, the allow must be checked, if it is not checked, then the user will not have access. When the deny box is checked, this means the user (or role) access is explicit denied, basicly eventhough if another role "check" the allow box, the access (or permission) will still be ...


Only top voted, non community-wiki answers of a minimum length are eligible