1

I am trying to upload an attachment to a custom object using the ajax toolkit so that I can avoid the page refresh after the upload. The solution works fine as long as session is present on the page.i.e for the salesforce users. Now we are making the page public using force.com sites and the attachments will be added in the context of the Site Guest User which doesn't have any session id. In this case the attachment is not getting added and I am getting the following error in the browser's console.

{faultcode:'UNKNOWN_EXCEPTION', faultstring:'UNKNOWN_EXCEPTION: Site under construction', }

Please note that I cannot enable the api for the guest users.

I need your help in finding a solution by which the site guest users can add the attachments and the page should also not refresh.

Thanks in advance.

2
  • Do you have the necessary permissions on the objects for the guest user profile?
    – Jayant Das
    May 4, 2018 at 20:07
  • Yes, I have given all the permission of the object to the guest user profile. May 4, 2018 at 20:38

0

You must log in to answer this question.

Browse other questions tagged .