You need to sign in to do that
Don't have an account?
binbin0915
how to get accessibility of Object Task's ID
my code is like that
if (!Schema.sObjectType.Task.fields.Id.isCreateable()){
return null;
}
but security check http://security.force.com/security/tools/forcecom/scanner#
show serious errs:
FLS_CREATE
if (!Schema.sObjectType.Task.fields.Id.isCreateable()){
return null;
}
but security check http://security.force.com/security/tools/forcecom/scanner#
show serious errs:
FLS_CREATE
Did not quite understand what exactly you are looking for?
The error is saying something about Field Level Security - Create permission.
Why is the loop returning null and what is that you checking with the field accessibility.
Regards,
Ashish
In order to pass security review it is true you need to check the CRUD, hope this code helps, this is what we have and we dont have issues.
beforeInsert
if(!myCustomObject__c.sObjectType.getDescribe().isCreateable())
{
throw new AppException(Label.accessDeniedonInsert);
}
beforeUpdate
if(!myCustomObject__c.sObjectType.getDescribe().isUpdateable())
{
throw new AppException(Label.accessDeniedonInsert);
}
beforeDelete
if(!myCustomObject__c.sObjectType.getDescribe().isDeletable())
{
throw new AppException(Label.accessDeniedonDelete);
}
Kind Regards,
Carolina.