Credit Limits in AX for Developers

By Leah Baker | June 6, 2013

Recently I extended the credit limit functionality in Dynamics AX 2012 for a customer. In developing the changes I did quite a bit of research on the existing classes and decided to document them here. Given that, here are the important pieces of credit limits in AX:

1. The CustParameters table and the CustParameters form define and persist what credit limits can be applied to. In AX the options are free text invoices and sales orders. The customer I was working for wanted the functionality expanded so credit limits were also verified on sales quotations.

2. The class CustCreditLimit is the base class for credit limit functionality. The class is extended by the two types of documents credit limits can be checked on free text invoices and sales orders.

-The extension classes are CustCreditLimit_CustInvoiceTable, CustCreditLimit_SalesTable and CustCreditLimit_SalesParmTable. The SalesParmTable accounts for sales orders that have been partially delivered.

-The construct method on CustCreditLimit instantiates one of the extending classes.

-The initQuery method defines the query used to retrieve open sales orders so it is arguably the most important method. The method is called by the balanceEstimate and calculateBalance methods in the CustCreditLimit class when calculating the current open balance of sales orders is for a customer.

3. The SalesTable table has three important pieces. The method checkAgainstCreditLimit instantiates the CustCreditLimit class, passing in the current sales order and runs the credit limit check. The update and validateWriteServer methods on SalesTable call the checkAgainstCreditLimit method. When a user enters a sales order for a customer that has a credit limit and the sales order goes beyond their credit limit, the validateWriterServer method is called when the sales order is saved. It fires up the credit check and the CustCreditLimit class throws the message to the infolog that says what the customer’s open balance is, and how much they’ve exceeded their limit by.

4. Credit limits are displayed on the customer, on sales orders and on free text invoices. For example, in AX go to Accounts Receivable > Common > Customers > All customers and select a customer. Click the Balance button in the ribbon at the top of the form, and in the form that opens will be a Credit limit and a Credit remaining amount. The Credit limit value is how much the customer can spend. The Credit remaining is how much they have left out of that credit limit. The same kind of values are displayed on a sales order and a free text invoice. When these totals/balances forms are opened they call into the CustCreditLimit class to retrieve the totals, so they use the same functionality that is used when the a sales order is entered and exceeds the credit limit.

Becky Newell

Related Posts

Recommended Reading:

Manage U.S. Use Tax on Purchase Orders in Dynamics 365 Finance and Operations

  Managing sales tax requirements on your business purchase can be complicated, but Dynamics 365 Finance and Operations can help […]

Read the Article
5.19.22 Dynamics CRM

How to Write a Great Support Ticket in the Stoneridge Support Portal

Submitting a support ticket through the Stoneridge Support Portal is a quick and effective way to get assistance for any […]

Read the Article

Managing Your Business Through Uncertain Times Using Dynamics 365 Finance and Operations

  Dynamics 365 Finance and Operations (F&O) can help you make informed decisions on how to move your business forward. […]

Read the Article
5.13.22 Power Platform

Using Power BI Object Level Security

  The following article will demonstrate how to use Power BI Object Level Security to disable column data based on […]

Read the Article
5.12.22 Dynamics CRM

How to Use the Stoneridge Support Portal

Stoneridge Software’s support portal is an intuitive and useful function that makes it easy for you to access resources to […]

Read the Article
5.6.22 Dynamics GP

Dynamics GP Transaction Removal: Purchase Orders

  Are you having performance issues with Purchase Orders?  Do you find that there are old Purchase Orders on your […]

Read the Article
5.5.22 Dynamics GP

The Real Story about the Long-Term Future of Dynamics GP Support

I’ve seen a number of people put forward comment that Dynamics GP is going away and you have to get […]

Read the Article

New Features in Dynamics 365 Business Central 2022 Wave 1 Release – Financial Enhancements

The Dynamics 365 Businses Central 2022 Wave 1 Release has a lot of new and exciting features to help your […]

Read the Article
4.29.22 Dynamics GP

Dynamics GP Transaction Removals: Bank Reconciliation

  This is part 2 of a 3 part series on Dynamics GP Transaction Removals. These quick tips will hopefully […]

Read the Article

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X