I have created a public site to create Lead records. It seems as though the site's profile has access to the composite Name field but not the FirstName or LastName fields. Eg:
//This doesn't Work
Lead l = [SELECT Name FROM Lead LIMIT 1];
this.firstName = l.FirstName;
//This works
Lead l = [SELECT Name FROM Lead LIMIT 1];
this.name = l.Name;
The profile for this site has read and edit access for leads, it also has access to the Name field. I do not see any options for granting access to FirstName, but as it's a composite field that is to be expected. Any advice as to a good workaround or a fix for this?