Please help me here.
Here is my code for reference, since the actionFunction returns only Pagereference or Void, how can I return the value of function to the next function.
<apex:component controller="EXP_DeleteRowActionController" allowDML="true">
<apex:form>
<apex:actionFunction action="{!doCheckBeforeDelete}" name="doCheckBeforeDelete" />
<apex:actionFunction action="{!deleteRecord}" name="deleteRecord" />
</apex:form>
<script>
function handleConfirm() {
try{
//I need some logic like this
//If doCheckBeforeDelete() return true then execute deleteRecord()
//Here my problem is actionFunction returns only PageReference or Void
deleteRecord();
}catch(error){
myToast();
}
}
function myToast(){
sforce.one.showToast({
'title':'zonex',
'message':'test',
'type':'warning'
});
}
</script>
</apex:component>
Thanks,
James