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)

Bank Account name of a customer

(0) ShareShare
ReportReport
Posted on by 2

Hi,

how to get bank account name of a customer from custtransopen or Custtable. 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Zohan,

    Why do you need that and how do you plan to deal with situations where a customer has multiple bank accounts? Do you already know the bank account that will be used before the customer has made the payment?

    Best regards,

    Ludwig

  • Zohan Profile Picture
    2 on at

    No there's no such any case occur in which i know the customer bank account

  • Suggested answer
    Mahmoud Hakim Profile Picture
    17,887 on at

    customer bank account stored in CustBankAccount table, so if you need it you can write display method to retrieve based on your business logic.

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Zohan,

    Do you want to include this info in the custtransopen table or where and why you need that info?

    Best regards,

    Ludwig

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    You can use following code/job to get a bank account name of a customer either from custtransopen or custtable.

    static void AXC_BankAccount(Args _args)
    {
        CustTransOpen custTransOpen;
        CustTrans     custTrans;
        CustTable     custTable;
        CustBankAccount custBankAccount;
        
        // From CustTable
        while select custTable
            where custTable.AccountNum == "XYZ" // Specify customeraccount here
            join custBankAccount
            where custBankAccount.CustAccount == custTable.AccountNum
        {
            info(strFmt("BankType: %1, Bank account Name: %1", custBankAccount.BankAccountType, custBankAccount.Name));
        }
            
        // From CustTransOpen
        while select custTransOpen
            join custTrans
            where custTransOpen.AccountNum == custTrans.AccountNum
            && custTransOpen.RefRecId == custTrans.RecId
            join custTable
            where custTable.AccountNum == custTrans.AccountNum
            && custTable.AccountNum == "XYZ" // Specify customeraccount here
            join custBankAccount
            where custBankAccount.CustAccount == custTable.AccountNum
        {
            info(strFmt("BankType: %1, Bank account Name: %1", custBankAccount.BankAccountType, custBankAccount.Name));
        }
    }

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