I have a sites visualforce page. I can input my employee number and return with name and email(apex:input so i can edit). but as a guest in the salesforce site, I only have read and create access. how can i update the email in contacts through this salesforce sites? thanks
1 Answer
From the Sites you can't update Standard object records.
As per your requirement create one custom object. In that object create fields which fields you want to update in contact
In this custom object create trigger to update in Contact!!
-
I am calling the email field for contact in apex:inputtext so when guest updated it, it will update the email in contact. Commented Apr 14, 2016 at 10:41
-
yes create email field in Custom object then write a trigger in custom object to copy the values from custom object to Contact.– ManiCommented Apr 14, 2016 at 10:50
-
but the filed value of apexinput is from contact. If the user edit that field it will go to email field in contact also @mani Commented Apr 15, 2016 at 1:21
-
In apexinput you need to add custom object email field not the contact field.. In trigger you can map this field with your contact field!!– ManiCommented Apr 16, 2016 at 7:27