Skip to main content

Notifications

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;
}

}

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 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.

  • Krishna4248 Profile Picture
    Krishna4248 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.

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 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.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,162 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans