web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Check report - print paymentaddress in recipeint addr

(0) ShareShare
ReportReport
Posted on by

hi 

i have a scenario in which i have to print payment address for vendor if available or i have to print primary address of the vendor in the cheque. I am doing this customization in AX 7.

which class i have to modify? How to get the vendor table in the DP class (chequeDP)

Regards

Annaa Mu

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    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());

    }

  • Suggested answer
    István Orosz Profile Picture
    2,137 on at

    Hi,

    ChequeDP already uses VendTable for vendor information in fetch() method called from the processreport(). I would recommend to make a descendant class from ChequeDP, override and modify fetch() to your needs. Please let me know, if you need more details.

    Kind Regards,

    István

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans