I have a requirement to send an email to individuals who are neither Salesforce users nor community users. Within the email, there is a hyperlink, and when they click on it, I need to update the contact record.
I attempted the following approach: a) I am sending an email when the email address is updated in the contact record. This email contains hyperlinks with the "recordId" and "isEmailVerified" as a parameters.
b) I created a site where I included a "verifyEmailComponent" Lightning Web Component (LWC).
c) When the user clicks on the link in the email, the component opens. In the "connectedCallback" method, I retrieve parameters from the URL, specifically the "recordId" and "isEmailVerified" parameters.
d) To update the record, I make an imperative call to an Apex class from the LWC. However, I encountered an error indicating that You don't have access to that Apex class.
How can I resolve this access issue to the Apex class? or you can suggest another approach.