8 réponses
Hello Pooja, Pls try this, it should work fine for you -
for (ObjectPermissions op : [SELECT SObjectType FROM ObjectPermissions WHERE Parent.Profile.Name = 'System Administrator']) {
if(op.SObjectType!=null && describe.get(op.SObjectType)!=null){
result.add(new NameLabel(op.SObjectType, describe.get(op.SObjectType).getDescribe().getLabel()));
}
}
I checked -
describe.get(op.SObjectType) is coming null.Thanks, Sumit Kumar Singh