Page 1 of 1
Row_Deleted Server Event
Posted: Fri Aug 16, 2013 12:43 am
by ccplusit
I am trying to run this function but cant seem to call the data I need to perform the function, any ideas please! If I manually put the AccountNumber number in and Id all works fine. But does not seem to find $this->AccountNumber->CurrentValue or $this->Id->CurrentValue;
function Row_Deleted(&$rs) {
echo $deleateaccountmail=$this->AccountNumber->CurrentValue ;
echo $deleatemailId=$this->Id->CurrentValue;
$client->deleteVoiceMail(array("Tokens"=> $tokens,"VoiceMailIn"=>array("AccountId"=>$deleateaccountmail,"VoiceMailId"=>$deleatemailId)));
}
Re: function Row Deleted
Posted: Fri Aug 16, 2013 1:45 am
by mobhar
As you can see, "Row_Deleted" event has an argument of the record deleted as an array.
So, simply use the following instead:
$deleateaccountmail = rs["AccountNumber"];
$deleatemailId = rs["$deleatemailId"];
Re: function Row Deleted
Posted: Fri Aug 16, 2013 1:48 am
by mobhar
Oops, typing too fast. The code should be:
$deleateaccountmail = $rs["AccountNumber"];
$deleatemailId = $rs["$deleatemailId"];
Re: function Row Deleted
Posted: Fri Aug 16, 2013 2:17 am
by ccplusit
Thanks that worked a treat, one to remember.