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
jls_74_txjls_74_tx 

Allow Guest License to delete records

I have a force.com site page: http://aim.force.com/locatormls/apex/MLS_ClientReservation?ID=a1KF0000001Nqw0MAC

 

I am using the apex:relatedlist to list the invoices created by the guest user.  I am using the standard salesforce Add New button which works fine.  Why doesn't the standard SF delete link work?  I have confirmed that permissions are granted.

 

It redirects to http://aim.force.com/locatormls/setup/own/deleteredirect.jsp?ID=a1KF0000001Nqw0MAC&delID=a1LF0000000wVEv&retURL=%2Flocatormls%2Fapex%2FMLS_ClientReservation%3FID%3Da1KF0000001Nqw0MAC

 

How do I envoke standard SF delete action method?

 

Steven LawranceSteven Lawrance

This is an interesting use case. The delete link URL doesn't have a confirmation token in it for cross site request forgery protection, and the system is likely rejecting the request because it is not in there. A confirmation token requires a session, but site guest users don't have sessions.

It's possible that, for now, a data table will need to be used for getting the Del link to work. The Del link can then be a command link that causes the record to get deleted by custom code in the controller.

 

The built-in Del link unfortunately doesn't work on a site guest user at this time, though it will be nice to get it fixed.

ManoharSFManoharSF

I recently worked on Force.com Site for that had similar reuirement. In my case my objective was CRU; after much effort I figured that its disabled for standard objects and can be only be only possible for custom objects..

 

so the only way I could achive it is through building a custom object which i used it as a kinda staging place and then converted it using the custom button and apex code behind.

 

hope this helps you.

 

good luck!

manohar

 

 

 

 

ManoharSFManoharSF

and in you case you can create a trigger that would do the trick based on some field action.