Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Problem with DLL-reference after upgrading R3 kernel

(0) ShareShare
ReportReport
Posted on by 25

Hello,

My understanding was that AX kernel updates were revision specific not code/CU so any AX2012 R3 kernel should be compatible with any CU code wise and advisable that kernel should be the latest?

We are currently running AX2012 R3 CU9 6.3.2000.326

We have attempted to update the kernel to the latest R3 kernel build based on KB links from https://blogs.msdn.microsoft.com/axsupport/2012/03/29/overview-of-microsoft-dynamics-ax-build-numbers/ to several versions but are encountering run-time errors with any kernel other than 6.3.2000.326

Attempted the following kernel versions on several different fresh AOS installs:

KB4089212 – kernel 6.3.6000.4444

KB4343775 – kernel 6.3.6000.6608

KB4457935 – kernel 6.3.6000.7046

All of them have installed successfully with no errors in the setup logs, full compile and CIL runs without errors.

When attempting to add a product to a sales line we encounter the following runtime error:

Error executing code: RetailPricingDataManager object does not have method 'getDiscountTradeAgreementsByDiscGroups'.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.

at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue)

at Microsoft.Dynamics.Ax.MSIL.Interop.ThrowCQLFuncError(IL_CQL_ERR cqlErr, String typeName, String methodName)

at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)

at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelperMIL.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)

--- End of inner exception stack trace ---

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

at Microsoft.Dynamics.AX.ManagedInterop.CReflectionCallHelper.CallXppObjectMethodinIL(Object pILXppInstance, String strMethod, Object[] pParamList)

at Microsoft.Dynamics.AX.ManagedInterop.Object.CallWithReturnType(String methodName, Type returnType, Object[] paramList)

at Microsoft.Dynamics.Commerce.Headquarters.RetailProxy.RetailPricingDataManager.getDiscountTradeAgreementsByDiscGroups(Container _itemIds, String _custAccount, DateTime _minDate, DateTime _maxDate, String _currencyCode, String _lineDiscGroup, String _multiLineDiscGroup, String _endDisc)

at Microsoft.Dynamics.Commerce.Headquarters.RetailProxy.AxPricingDataManager.ReadDiscountTradeAgreements(ISet`1 itemIds, String customerAccount, String lineDiscGroup, String multilineDiscountGroup, String totalDiscountGroup, DateTimeOffset minActiveDate, DateTimeOffset maxActiveDate, String currencyCode)

at Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine.Discount.CalcCustomerDiscount(IPricingDataManager pricingDataManager, RoundingRule salesRoundingRule, SalesTransaction salesTransaction, PriceContext priceContext)

at Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine.Discount.CalculateDiscount(IPricingDataManagerV2 pricingDataManager, SalesTransaction transaction, PriceContext priceContext)

at Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine.PricingEngine.CalculateDiscountsForLines(IPricingDataManagerV2 pricingDataManager, SalesTransaction transaction, Boolean shouldTotalLines, PriceContext priceContext)

at Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine.PricingEngine.CalculateDiscountsForLines(IPricingDataManagerV2 pricingDataManager, SalesTransaction transaction, RoundingRule roundingRule, CurrencyConverter currencyConverter, String currencyCode, String lineDiscountGroup, String multilineDiscountGroup, String totalDiscountGroup, Boolean shouldTotalLines, DiscountCalculationMode calculationMode, DateTimeOffset activeDate)

at Dynamics.Ax.Application.RetailOrderCalculator.Calculatediscountsfororder() in RetailOrderCalculator.calculateDiscountsForOrder.xpp:line 19

at Dynamics.Ax.Application.RetailSalesOrderCalculator.Setdiscountoncurrentline() in RetailSalesOrderCalculator.setDiscountOnCurrentLine.xpp:line 13

at Dynamics.Ax.Application.SalesPurchLine.Setpriceagreement(InventDim _inventDim, Boolean _doCallPriceDate, PriceDiscPolicyCheckPolicy _checkPolicy, Boolean _initDateFields, RetailSalesPurchLineMap _retailSalesPurchLineMap, Boolean , Boolean , Boolean , Boolean ) in SalesPurchLine.setPriceAgreement.xpp:line 48

at Dynamics.Ax.Application.SalesPurchLine.Setpriceagreement(InventDim _inventDim, Boolean _doCallPriceDate, PriceDiscPolicyCheckPolicy _checkPolicy, Boolean _initDateFields, RetailSalesPurchLineMap _retailSalesPurchLineMap)

at Dynamics.Ax.Application.SalesLine.Setpriceagreement(InventDim _inventDim, PriceDiscPolicyCheckPolicy _checkPolicy, Boolean _initDateFields, RetailSalesLine _retailSalesLine, Boolean , Boolean , Boolean ) in SalesLine.setPriceAgreement.xpp:line 6

at Dynamics.Ax.Application.SalesLine.Setpriceagreement(InventDim _inventDim, PriceDiscPolicyCheckPolicy _checkPolicy, Boolean _initDateFields, RetailSalesLine _retailSalesLine)

at Dynamics.Ax.Application.SalesLine.Setpricedisc(InventDim _inventDim, Boolean _initDateFields, RetailSalesLine _retailSalesLine, Boolean , Boolean ) in SalesLine.setPriceDisc.xpp:line 34

at Dynamics.Ax.Application.SalesLine.@Setpricedisc(InventDim _inventDim, Boolean _initDateFields, Boolean )

at Dynamics.Ax.Application.SalesLine.Setpricedisc(InventDim _inventDim)

at Dynamics.Ax.Application.SalesLine.modifySalesQtyIL(Object[] _inputContract) in SalesLine.modifySalesQtyIL.xpp:line 48

at SalesLine::modifySalesQtyIL(Object[] )

at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)

at Dynamics.Ax.Application.SysDictTable.invokeStaticMethod(Object[] _params) in SysDictTable.invokeStaticMethod.xpp:line 32

at SysDictTable::invokeStaticMethod(Object[] )

at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)

at Microsoft.Dynamics.Ax.Xpp.PredefinedFunctions.runAsInvoke(String className, String staticMethodName, Object[] parms, Object[]& exportInfolog)

We can’t find any reference in AX to this method so assuming one of the other DLL’s is referencing it.

We have tried re registering the following DLL’s in the bin directory in the GAC based on https://community.dynamics.com/ax/f/33/t/152585

Microsoft.Dynamics.Commerce.Runtime.dll

Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine.dll

Overwriting the PricingEngine.dll with the original 6.3.2000.326 version fixes the runtime error and full compile and CIL still works with all the other components updated but unsure as to the wider implications of a mismatch of DLL versions? It does seem to crash the AOS when adding a product in this state on one environment but not on another so not sure that is the cause of that instability.

Should we not attempt any kernel updates and stick with the CU9 6.3.2000.326 kernel until we are at a point to do a code upgrade to CU13?

Anyone had any similar issues?

*This post is locked for comments

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Problem with DLL-reference after upgrading R3 kernel

    First of all, you can't use any kernel with any CU. The kernel is backwards compatible so you should be able to use a newer kernel version on a lower application version.

    But if you follow the link to the latest kernel version, you will notice that the hotfix in question actually includes an application hotfix as well. So maybe some new x++ methods are needed for this kernel version. I think this is not in line with the backwards compatibility story, but anyway this seems to be the case.

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…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans