You need to sign in to do that
Don't have an account?
Amit Singh 1
how to remove crud delete security issue in Salesforce Checkmarx?
Hi Folks.
Need urgent help. I am stucked into Salesforce Security Checkmarx isue I am getting CRUD Delete error while I have applied all the check into Delete operation. Still getting same Error.
I have a list of Dynamic sObject it can be any sObject. Below is Screenshot of My code and code as.
Please help any help will be greatly appriciated.
Thanks,
Amit
Need urgent help. I am stucked into Salesforce Security Checkmarx isue I am getting CRUD Delete error while I have applied all the check into Delete operation. Still getting same Error.
I have a list of Dynamic sObject it can be any sObject. Below is Screenshot of My code and code as.
Please help any help will be greatly appriciated.
public static boolean isSafeObjectDel(List<sobject> delId) { boolean result=false; Map <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe(); for(Sobject del : delId){ Id dId = del.id; String objName = dId.getSObjectType().getDescribe().getName(); SObjectType myObj = Schema.getGlobalDescribe().get(objName); if (myObj.getDescribe().isDeletable()) { result = true; }else{ return false; } } return result; }
Thanks,
Amit
All Answers
May I request you please confirm if you have the delete permission on the object you are operating?
If you are getting the above error being logged in as a system administrator may I suggest you please check with following steps from the below link which might help?
- https://developer.salesforce.com/page/Enforcing_CRUD_and_FLS
Please let us know if this helps.Thanks,
Nagendra