You need to sign in to do that
Don't have an account?
![Diwakar G 7 Diwakar G 7](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
ApexCRUDviolation Fix
Hi,
How to fix ApexCRUDViolation for inner query. Below is the query.
Thanks and Regards,
Diwakar G
How to fix ApexCRUDViolation for inner query. Below is the query.
proposal = [select Id, Name,(Select Id From PQConfig__Configurations__r) From Proposal__Proposal__c Where Proposal__Opportunity__c =:lead.ConvertedOpportunityId];I tried the below one to fix the violation. Violation is fixed.
if(!Schema.sObjectType.Proposal__Proposal__c.isQueryable() && !Schema.sObjectType.PQConfig__Configurations__r.isAccessible()) { return null; }But, PQConfig__Configurations__r is not an object. Getting error while saving class in Salesforce. Please help me to fix the violation.
Thanks and Regards,
Diwakar G
Hi,
Please help me to fix the issue.
Thanks and Regards,
Diwakar G
This will resolve the Apex PMD error. Mark this as best answer if it helped.