web
You’re offline. This is a read only version of the page.
close
Skip to main content
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,827 Moderator on at
    RE: how to get customer Credit remaining balance in api d365fo x++

    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
    RE: how to get customer Credit remaining balance in api

    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,827 Moderator on at
    RE: how to get customer Credit remaining balance in api

    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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans