I am using the below code and found that debugger is not hitting the event handler.Please give ur opinion
My Code :
Custvendcheque class :
[HookableAttribute (true)]
private void initTmpChequePrintout(
----------
Custvendcheque_Eventandler :
[PostHandlerFor(classStr(CustVendCheque), methodStr(CustVendCheque, initTmpChequePrintout))]
public static void CustVendCheque_Post_initTmpChequePrintout(XppPrePostArgs _args)
{
VendTable vendTable;
CustVendCheque custVendCheque;
TmpChequePrintOut tmpChequePrintOut;
DirPartyPostalAddressView dirPartyAddress;
DirPartyLocationRole dirPartyLocationRole;
LogisticsLocationRole locationRole;
custVendCheque = _args.getThis() as CustVendCheque;
vendtable = _args.getArg(identifierStr(_vendTable)) as VendTable;
select Address from dirPartyAddress
join dirPartylocationRole where dirPartyAddress.Location == dirPartylocationRole.PartyLocation
join locationRole where locationRole.recid == dirPartylocationRole.LocationRole
&& dirPartyAddress.Party == vendtable.Party
&& locationRole.Type == LogisticsLocationRoleType::Payment;
if(dirPartyAddress)
tmpChequePrintOut.Address = dirPartyAddress.Address;
else
tmpChequePrintOut.Address =any2Str(vendtable.postalAddress());
}