You need to sign in to do that
Don't have an account?

Delete option for Partner Portal users
Hi,
I am aware that Partner Portal users do not have access to delete records of standard objects.
Wondering if we can have a custom button on Contacts object which will force delete that record on button click?
Thanks,
VK
I doubt this will work if you use native page layout and detail button. But What I can suggest to you is to create a VFP , StandardController="Contact" and extention="ControllerClass" , Open this page on on click of this button and pass id of contact , You can use exeute JavaScript on button and use location.href=
This page should have a page level action to invoke controller method , which should delete the record from controller. Make the controller as without sharing class.
Here is code :
APEX
Hard code Id is just for testing. You can change the logic of getting records according to your need.
VFP
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Thanks Ankit, I will try this.
thanks,
VK
Let me know if it work for you.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Hey Ankit,
I used the following on the Contact object. Here I am using a button which will execute a script just to change the Contact.Title to "Delete" and an admin will later review and do a perform a mass delete.
Got this from an AppExchange package.
/* This code allows the javascript to access the API and push data into the Org.*/
{!requireScript("/soap/ajax/10.0/connection.js")};
sforce.connection.session = "{!$Api.Session_ID}";
function updateContact( )
{
try
{
var c = new sforce.SObject("Contact");
c.Id = "{!Contact.Id}";
c.LastName = c.LastName;
c.Title = "Delete";
var result = sforce.connection.update([c]);
if (result[0].getBoolean("success") == false )
{
alert(result[0].errors.message);
return;
}
window.top.location.href="https://na8.salesforce.com/003?fcf=00BC00000086bCn";
}
catch (e)
{
alert(e);
}
}
updateContact();
Hope this helps others with similar requirements.
Thanks,
VK