function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
William SymansWilliam Symans 

On scratch org, community guest user can't see lead fields.

Hello,
I'm developing a lightning-record-edit-form on an unathenticated community to allow lead entry. I'm testing this on a scratch org. When I view the page as System Admin, all good. When I view the page as guest user none of the lead fields show up. I've adjusted the FLS and object settings in the guest user profile but it didn't help. I'm thinking this is either a quirk of lightning-record-edit-form or scratch orgs. Anyone encounter something like this? Thanks in advance.
mukesh guptamukesh gupta
Hi William,

Please follow below url:- 

https://trailblazer.salesforce.com/issues_view?id=a1p3A000001GN1gQAG&title=community-guest-user-may-see-the-error-the-requested-resource-does-not-exist-while-creating-record-from-community-using-the-lightning-recordeditform

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh
William SymansWilliam Symans
Mukesh,

Thank you for taking the time to reply. I think that known issue is very similar to the issue I'm having. In my case, the fields don't even render. I did notice in the console, a 401 when trying to connect to the UI API to build the page (webruntime/api/public/en-US/services/data/v53.0/ui-api/record-defaults/create/Lead?) - (401 (Unauthorized)). I suspect that despite having create access to the object via REST, the guest user profile does not have access the the UI API. The docs about this API explicitly indicate "Users with a Customer Community or Partner Community User License can access User Interface API." but does not mention guest users. 

I'm just going to refactor at this point. It's a pretty basic form and not worth the research and wait but hopefully this and your reply helps someone in the future.

Bill