+ Start a Discussion
EldonEldon 

Schema.sObjectType.contact.fields.Newsletter_Status__c.isUpdateable() is returning false even though the profile has edit access to this field

Hi All,

In my contact object I have a field named NewsletterStatus. When my apex class is executed by a guest user, the method Schema.sObjectType.contact.fields.Newsletter_Status__c.isUpdateable() is returning false even though the guest profile and admin profile have edit access to this field and the object. Any reason for this?

Thanks in advance
Eldon K
AbhinavAbhinav (Salesforce Developers) 
HI Eldon ,

  Securing access to records by guest users
 
> Guest user external org-wide defaults are always set to private.
> Guest users can't have more than read access to data.

Reference:
https://help.salesforce.com/articleView?id=sf.networks_guest_policies_timelines.htm&type=5

Related question:
https://salesforce.stackexchange.com/questions/138317/schema-sobjecttype-object-fields-isupdateable-returns-false-despite-profile-co

related Article
https://katiekodes.com/salesforce-spring-20-guest-user/

Hope it helps, Please mark it as best answer .

Thanks!
EldonEldon
Hi Abhinav,

Thanks for the quick response.

I understand guest users dont have edit access to fields. But then how do we give the IsUpdateable conditions in our code which are necessary for passing the security review? We have an apex code where the guest user is updating a contact field and campaign member fields. So for the security review we need to give isupdateable condition before updating it. But it wont work since isupdateable is false for guest users. What do we do in this situation.

Regards
Eldon K