You need to sign in to do that
Don't have an account?

FLS for Database.delete
if (!(EMPYRAMDM__UploadedContact_Csv_Dup__c.sObjectType.getDescribe().isDeletable())) {
system.debug('**Cannot Delete the Uploaded Contact CSV Duplicates');
}else{ Database.delete (scope, false);
}
Hi,here is my requirement,I am tirying delete the records from db using database.delete,i had written the above FLS. Even though i got FLS issues.need help in Writing FLS for the above database.delete.urgent requirement.thanks in advance.
system.debug('**Cannot Delete the Uploaded Contact CSV Duplicates');
}else{ Database.delete (scope, false);
}
Hi,here is my requirement,I am tirying delete the records from db using database.delete,i had written the above FLS. Even though i got FLS issues.need help in Writing FLS for the above database.delete.urgent requirement.thanks in advance.
by this code you are checking OLS (Object level security) not FLS. So, if the current user have a delete permission in his/her profile dat can be deleted. ontherwise not. However, can you please show me the exact error you are facing ?
Thanks,
Prosenjit
I am getting the same issue.I am using isDeletable to delete the account but In my scanning report same issue is coming.
Pls help me out.
if (Schema.sObjectType.Account.isAccessible() && Schema.sObjectType.Account.isDeletable())
{
selectedAccountlist.sort();
database.delete(selectedAccountlist,false);
}