You need to sign in to do that
Don't have an account?
mandyc
Visualforce page not deleting record
Hello,
I have a related list that is a visualforce page. I am trying to use a commandlink to delete records from the related list; however, the code is not working. There is no error message displayed. Any assistance is appreciated!
VF page:
<apex:commandlink value="Del" id="customDelete" onClick="return confirmDelete()">
<apex:param name="delID" value="{!attorney.ID_1__c}" assignTo="{!SelectedId}"/>
</apex:commandlink>
Class:
public void customDelete()
{
New List<Att_IP__c> att = [SELECT Id FROM Att_IP__c WHERE Id = :SelectedId];
if (att.size() > 0){
Delete att;
}
}
I have a related list that is a visualforce page. I am trying to use a commandlink to delete records from the related list; however, the code is not working. There is no error message displayed. Any assistance is appreciated!
VF page:
<apex:commandlink value="Del" id="customDelete" onClick="return confirmDelete()">
<apex:param name="delID" value="{!attorney.ID_1__c}" assignTo="{!SelectedId}"/>
</apex:commandlink>
Class:
public void customDelete()
{
New List<Att_IP__c> att = [SELECT Id FROM Att_IP__c WHERE Id = :SelectedId];
if (att.size() > 0){
Delete att;
}
}
Here`s a detailed blog written by Bob on the topic of passing param http://bobbuzzard.blogspot.sg/2011/07/passing-parameters-to-apex-method-from.html
Hope it helps,
Nikunj Doshi