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

Problem with Redirecting on Standard Delete Link
Hi,
I have overriden the delete link of a custom object to redirect to a custom vf page. The custom page shows the members associated with the custom object. When members are associated delete is not possible - user has to remove members and then delete the record of custom object. The problem is when there are no members associated with the object even then user is redirected to custom page. I need to have a control on redirect such that, only when members are associated, redirect happens and when members are not associated redirect should not happen and selected record should be deleted.
Any solution would be appreciated.
Hi Krishna,
<apex:page controller="XYZ" action="{!DeleteWithOutRender}" rendered="{!DoNotOpen}">
All UI for member available
</apex:page>
Public class XYZ{
public boolean DonotOpen {get;set;}
public void DeletewithOutRender (){
if(member > 0){
DoNotOpen = true ;
}
Else{
DoNotOpen = False;
delete record ;
}
}
}
If it's work,Please add in Kudos.
page
System.LimitException: DML currently not allowed
Class.householdDeleteController.DeletewithOutRender: line 78, column 1
Class.householdDeleteController.<init>: line 33, column 1
How can i avoid the above exception?