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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

how to get customer Credit remaining balance in api

(0) ShareShare
ReportReport
Posted on by 32

Hi,

I am trying to create API for display Credit remaining, based on standard code i wrote below code in my service class, but i am not getting value. Please replay me asap.

if possible update my code.

Kindly respond my query asap.

public AmountMST updateBalance(CustAccount customerCode)
{

BankLCCustTransHelper bankLCTransHelper;
Amount creditLimitBalance;
TmpCustVendTrans tmpCustVendTrans = TmpCustVendTrans::custTransBalanceCurrency(
customerCode,
true,'AED',BankLCBankDocumentType::All);

while select AmountMST from tmpCustVendTrans
where tmpCustVendTrans.Txt == "@SYS94872"
{

return tmpCustVendTrans.AmountMst;
}

}

I have the same question (0)
  • GirishS Profile Picture
    27,843 Moderator on at

    Hi Krishna,

    Have you debugged the code?

    Try to create a runnable class and check whether the code you have written is working properly.

    Thanks,

    Girish S.

  • Krishna4248 Profile Picture
    32 on at

    Hi Girish,

    Thanks for your kind response, I did debugging, in standard method  custTransBalanceCurrency()

    it not going Inside  if look,

               if  (CustParameters::find().CreditMaxCheck != TypeOfCreditmaxCheck::None)

    If possible help me on this, to get remaining balance.

  • Suggested answer
    GirishS Profile Picture
    27,843 Moderator on at

    I am not sure what to give in CreditMaxCheck- Can you open the CustParameters table browser and change the CreditMaxCheck value to some other, other than None.

    Also refer to the below thread which might help you. You need to call the new method of CustCreditLimit class - Using that call the required methods to get credit limit balance.

    https://www.dynamicsuser.net/t/how-to-get-the-available-credit-limit-for-a-customer-in-ax-2012-r2-cu7/57842

    Thanks,

    Girish S.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
SajeedMullaji Profile Picture

SajeedMullaji 366

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 289 Super User 2026 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 260 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans