{"id":561,"date":"2019-11-14T17:16:52","date_gmt":"2019-11-14T16:16:52","guid":{"rendered":"http:\/\/daxvisionerp.com\/?p=561"},"modified":"2025-10-27T08:19:25","modified_gmt":"2025-10-27T08:19:25","slug":"axdappdimensionutil-does-not-designate-a-class-or-table","status":"publish","type":"post","link":"https:\/\/daxvisionerp.com\/home\/axdappdimensionutil-does-not-designate-a-class-or-table\/","title":{"rendered":"Dynamics 365 F&#038;O upgrade of &#8216;AxdDimensionUtil::getLedgerAccountId &#8216;"},"content":{"rendered":"\n<p> &#8216;AxdAppDimensionUtil&#8217; class has been deprecated in Dynamics 365 F&amp;O and you can see the following error when trying to use it: <\/p>\n\n\n\n<p>&#8221;AxdAppDimensionUtil&#8217; does not designate a class or table&#8217;. <\/p>\n\n\n\n<p>Here is how to upgrade &#8216;getLedgerAccountId&#8217; method of this class to resolve the error related to that. This is not the only method used from the class, but it is frequently used so hopefully, my post will be useful for some people.  I made a review of what Microsoft did to their code to see how to resolve it. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example: Classes\/TMSInvoiceApproval.<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/11\/TMSInvoiceApproval-1.png\" alt=\"\" class=\"wp-image-563\"\/><figcaption class=\"wp-element-caption\">TMSInvoiceApproval.SetAccounts in AX 2012<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/11\/TMSInvoiceApprovalD365-1024x526.png\" alt=\"\" class=\"wp-image-564\"\/><figcaption class=\"wp-element-caption\"> MSInvoiceApproval.SetAccounts in Dynamics 365 F&amp;O<\/figcaption><\/figure>\n\n\n\n<p>What you can see here is that this code:<br><code>matchReasonVendAcct =&nbsp; AxdDimensionUtil::getLedgerAccountId([_matchReason.LedgerAccount, _matchReason.LedgerAccount, 0])<\/code>;<br><\/p>\n\n\n\n<p>Become:<br><code>LedgerAccountDimensionResolver ledgerAccountDimensionResolver = LedgerAccountDimensionResolver::newResolver(_matchReason.LedgerAccount);<br>         ledgerAccountDimensionResolver.parmDimensionFormat(DimensionAttribute::find(DimensionAttribute::getWellKnownDimensionAttribute(DimensionAttributeType::MainAccount)).Name);<br>         matchReasonVendAcct = ledgerAccountDimensionResolver.resolve();<\/code><\/p>\n\n\n<p>Other examples that you can check are:<\/p>\n<ul>\n<li>\\Classes\\TMSInvoiceApproval\\findOrCreateDynamicDimension<\/li>\n<li>\\Classes\\TMSXMLApportionment_Dimension\\readAppEntity<\/li>\n<li>\\Classes\\AxdAdvancedLedgerEntry\\getDimensionId<\/li>\n<\/ul>\n<p>This will help to upgrade your code that is using the deprecated &#8216;AxdDimensionUtil::getLedgerAccountId(&#8230;)&#8217;.<!--StartFragment--><\/p>\n<p><!--EndFragment--><\/p>\n\n\n<p><\/p>\n\n\n<div class=\"taxonomy-post_tag wp-block-post-terms\"><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/msdyn365fo\/\" rel=\"tag\">#MSDyn365FO<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/axdappdimensionutil\/\" rel=\"tag\">AxdAppDimensionUtil<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/code-upgrade\/\" rel=\"tag\">Code upgrade<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/deprecated\/\" rel=\"tag\">Deprecated<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/ledgeraccountdimensionresolver\/\" rel=\"tag\">LedgerAccountDimensionResolver<\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>&#8216;AxdAppDimensionUtil&#8217; class has been deprecated in Dynamics 365 F&amp;O and you can see the following error when trying to use it: &#8221;AxdAppDimensionUtil&#8217; does not designate a class or table&#8217;. Here is how to upgrade &#8216;getLedgerAccountId&#8217; method of this class to resolve the error related to that. This is not the only method used from the [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"1080","footnotes":""},"categories":[19],"tags":[25,53,55,57,59],"class_list":["post-561","post","type-post","status-publish","format-standard","hentry","category-dynamics-365fo","tag-msdyn365fo","tag-axdappdimensionutil","tag-code-upgrade","tag-deprecated","tag-ledgeraccountdimensionresolver"],"_links":{"self":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/comments?post=561"}],"version-history":[{"count":1,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/561\/revisions"}],"predecessor-version":[{"id":1395,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/561\/revisions\/1395"}],"wp:attachment":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/media?parent=561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/categories?post=561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/tags?post=561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}