+ Start a Discussion
Deborah OrthDeborah Orth 

Secure Secret Storage - Apex class is not implementing a CRUD/FLS check on the Name field of the Encrypt_DecryptC__c object

I've added all these line of code in the Save() method to try to satisfy the "Modify the save() function to implement CRUD/FLS check on the Name field of the Encrypt_Decrypt__c object." requirement but nothing seems to pass it's check.  Anyone else run into this or have any ideas?

        if (!Schema.sObjectType.EnCrypt_Decrypt__c.fields.Name.isCreateable()) { 
            return NULL; 
        }
        if (!Schema.sObjectType.EnCrypt_Decrypt__c.fields.Name.isUpdateable()) { 
            return NULL; 
        }        
        if (!Schema.sObjectType.EnCrypt_Decrypt__c.fields.Name.isAccessible()) { 
            return NULL; 
        }        

Thanks,
Deb
Best Answer chosen by Deborah Orth
Deborah OrthDeborah Orth
I figured it out, the object name is EnCrypt_DecryptC__c for the challenge, not EnCrypt_Decrypt__c which is used for the demo.

All Answers

Deborah OrthDeborah Orth
I figured it out, the object name is EnCrypt_DecryptC__c for the challenge, not EnCrypt_Decrypt__c which is used for the demo.
This was selected as the best answer
Charles ThompsonCharles Thompson
Thank you, Deborah.  You saved me from pulling more hair out!   Trailhead needs to point that little detail out.