Credit Limits in AX for Developers

by | Updated December 23, 2014 | Development, Dynamics AX

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

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events

july

01jul11:00 am12:00 pmConfab Live with Stoneridge – Dataverse Virtual Entities

14jul12:00 pm12:30 pmBeyond Reporting - What Business Intelligence Can Do For Your Agribusiness

15jul10:00 am11:00 amMastering the Production Floor

21jul10:00 am10:30 amThe Modern Manufacturer: Manufacturing Software in the Real World

21jul12:00 pm1:00 pmIs it Worth it to Upgrade to Dynamics 365 Finance and Supply Chain Management? - Everything AX Users Need to Consider

28jul10:00 am10:30 amLot Management for Batch Manufacturers in Life Sciences, Chemical and Food

28jul2:00 pm2:30 pmConsiderations for Successful Testing Plans for Major Releases of Dynamics 365 Finance and Supply Chain Management

29jul11:00 am12:00 pmConfab Live with Stoneridge – Integration Strategies for End User Success

august

04aug2:00 pm2:30 pmSimplifying Payroll and HR Management with ADP Workforce Now

10aug(aug 10)8:00 am11(aug 11)11:00 amPower BI for Dynamics 365 - Online Workshop

11aug10:00 am10:30 amThe Modern Manufacturer - Enterprise Asset Management

11aug12:00 pm12:30 pmBusiness Intelligence with Dynamics 365 Finance and Supply Chain Management – Game Changing Insights and Analytics

11aug2:00 pm2:30 pmUsing Technology to Manage Complex Sales Pricing, Commission, and Rebate Programs

18aug10:00 am11:00 amTop Five Reasons Why NOW is the Right Time to Move from Salesforce to Dynamics 365 Customer Engagement

18aug10:00 am12:00 pmIntro to Power BI for Dynamics 365 Business Central – Online Workshop

18aug12:00 pm1:00 pmSolving the Biggest Challenges in Agribusiness Through Innovation and Technology

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X