You need to sign in to do that
Don't have an account?
checkmarx :APEX CURD and FLS issues
Hi Guys,
We got an error that our code not Enforced SF CRUD and FLS(http://wiki.developerforce.com/index.php?title=Enforcing_CRUD_And_FLS) from Checkmarx report. we could not found anything wrrong in the code. please help me to resolve this issue,
---------------------------------------------
public class DefaultValues
{
public void SetDefaultValues()
{
if(Account.sObjectType.getDescribe().isCreateable())
if (Schema.sObjectType.Account.fields.Name.isCreateable() &&Schema.sObjectType.Account.fields.Description__c.isCreateable() && Schema.sObjectType.Account.fields.ObjectType__c.isCreateable() && Schema.sObjectType.Account.fields.EnabledStatus__c.isCreateable() )
{
List<Account> ListAccont=new List<Account>();
Account ObjAccountExact=new Account();
ObjAccountExact.Name='1st Pass - Strict';
ObjAccountExact.Description__c='Acct Name, Phone & City Exact';
ObjAccountExact.ObjectType__c='account';
ObjAccountExact.EnabledStatus__c='false';
ListAccont.Add(ObjAccountExact);
insert ListAccont;
}
}
}
Hello Rahul,
Please refer following documents for having a better understanding on apex crud and fls:
http://wiki.developerforce.com/page/Enforcing_CRUD_and_FLS
https://help.salesforce.com/apex/HTViewSolution?urlname=CRUD-and-FLS-on-VisualForce-Page&language=en_US
Hi
I checked all the referenced links but they were not helpful to resolve my code issue..
You only have to worry about the critical and serious errors. The warnings are something of best practices. Not to be ignored, but not to worry about.
Throwing critical and serious errors:CRUD/FLS create issue with high Severity.
We are also facing the same type issues, have you got any resolution for these issues.
Regards,
Sridhar Bonagiri
Hi All,
I faced the same issue. I browsed various blogs and websites for solution.
So finally i decided a discussion with SFDC security Review team.
In intial discussion, they told that there may be some false positive reported.
As i will get more detail from them, then i will post here more.
Regards,
Ghanshyam Bhatt
Hi All,
Did anyone find the solution to this, This is buring issue with one of my client.
Thanks,
SaleemBaba Mohammed
Thanks,
Saleem Baba
try this class to check fls by just passing query
https://github.com/sonicfurqan/CheckCURDSalesforce.git