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
csbaacsbaa 

Edit Account through Webservice method exposed in a Site

Hello Helper

I  created a simple webservice which  edits  account records  
I want  to give access tu user  to this webservice in non autentificate mode throught Site

I read some article  and I sew that this is possible.
I created a site
I  added my webservice class  to the site user  profile

Hovewer when i opened the Public access settings  I noticed that is NOT  possible to give EDIT  permission for the account object

Ca anybody  comment on this?
Would itr be possible  to  edit an account  with a webservice exposed in Site?


Thanks in advance
csbaa

 
Best Answer chosen by csbaa
ShashankShashank (Salesforce Developers) 
It is true that you cannot give edit access to standard objects through Public Access Settings.

However, you can work around it by using a custom object. Custom objects can be given edit access. Hence, if you create a custom account object, have the public sitte users see and update this custom object instead, we can then use apex triggers on the custom object to update the account records. I haven't tried it myself though.

Here's another approach: https://developer.salesforce.com/forums/ForumsMain?id=906F000000099TrIAI