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
IntroAmmyIntroAmmy 

apex class not getting called if I am creating lead record via community

I have created community and added lightning component on that while i am hitting the community url on the same session when i logged in salesforce working fine.
but if i am opening the same url in other browser(not logged with salesforce org) it only showing the page not fetching the picklist values form class on picklist field i mean Apex class not getting called, 
Already added apex class to cummunity profile

can somenone please help me on that
PriyaPriya (Salesforce Developers) 

Hi,

Have you checked the access level of apex class ?

Check the below permission 
1. At profile level check API Enabled administrative permission enabled  or not ..( this is an optional ) 
2. Users must also have access to the Apex classes that provide the Apex REST services. You can control security settings for Apex classes via the Apex Classes setup page in Salesforce. Go to Apex Class securities add this apex class to the profile 

Regards,

Priya Ranjan

Rakshana Cube84Rakshana Cube84
Hi,

It must be apex class permission for the community user/guest user. Please provide a screenshot and set up a debug log to identify what's the backend issue. Happy to help!

Thanks,
Rakshana