{"id":829,"date":"2024-10-24T15:45:43","date_gmt":"2024-10-24T07:45:43","guid":{"rendered":"https:\/\/dev-d365fo.pantheonsite.io\/?p=829"},"modified":"2024-10-24T16:51:16","modified_gmt":"2024-10-24T08:51:16","slug":"how-to-show-financial-dimensions-on-form-grid-in-d365fo","status":"publish","type":"post","link":"https:\/\/dev-d365fo.pantheonsite.io\/how-to-show-financial-dimensions-on-form-grid-in-d365fo\/","title":{"rendered":"\u5982\u4f55\u5728D365FO\u4f7f\u7528\u89c6\u56fe\u5728\u7a97\u4f53\u4e0a\u663e\u793a\u67d0\u4e00\u4e2a\u8d22\u52a1\u7ef4\u5ea6(Financial dimensions)"},"content":{"rendered":"\n

\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u4e86\u89e3\u5982\u4f55\u4f7f\u7528\u89c6\u56fe\u5c06\u8d22\u52a1\u7ef4\u5ea6(Financial dimensions)\u663e\u793a\u4e3a\u8868\u5355\u7f51\u683c\u4e2d\u7684\u5b57\u6bb5\uff0c\u8be5\u89c6\u56fe\u5c06\u4f7f\u7528\u8ba1\u7b97\u5217\u76f4\u63a5\u4ece\u8868\u4e2d\u68c0\u7d22\u4fe1\u606f\u3002\u8fd9\u662f\u4e00\u79cd\u5feb\u901f\u83b7\u53d6\u4fe1\u606f\u4ee5\u5c06\u5176\u663e\u793a\u5728\u5217\u8868\u4e2d\u7684\u65b9\u6cd5\uff0c\u5e76\u4e14\u80fd\u591f\u4f7f\u7528\u63a7\u4ef6\u6309\u7ef4\u5ea6\u503c\u8fdb\u884c\u7b5b\u9009\u3002<\/font><\/font><\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

<\/p>\n\n\n\n

\u89e3\u51b3\u65b9\u6848\uff1a<\/h2>\n\n\n\n

\u5982\u4f55\u505a\uff1a<\/p>\n\n\n\n

\u6b65\u9aa4 1\uff1a\u521b\u5efa\u89c6\u56fe<\/h3>\n\n\n\n

\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u89c6\u56fe ( FTDDimensionSetView<\/strong> )\uff0c\u4f7f\u7528 DimensionAttributeValueSet<\/strong> \u4f5c\u4e3a\u6570\u636e\u6e90\uff0c\u5e76\u6dfb\u52a0 RecId<\/strong> \u4f5c\u4e3a\u89c6\u56fe\u5b57\u6bb5\u3002\u8bf7\u6ce8\u610f\uff0c\u6b64 RecId<\/strong> \u5c06\u662f  \u8868\u4e2d\u6211\u4eec\u60f3\u8981\u663e\u793a\u7ef4\u5ea6\u7684DefaultDimension\u5b57\u6bb5\uff08\u672c\u4f8b\u4e2d\u4e3a<\/strong>CustTrans<\/strong>  \uff09\uff0c\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u6211\u5728\u89c6\u56fe\u4e2d\u4e5f\u5c06\u5176\u547d\u540d\u4e3a DefaultDimension\u3002<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

\u6b65\u9aa4 2\uff1a\u521b\u5efa\u8ba1\u7b97\u5217\u65b9\u6cd5<\/h3>\n\n\n\n

\u6211\u4eec\u5c06\u5bf9\u8981\u6dfb\u52a0\u5230\u89c6\u56fe\u4e2d\u7684\u6bcf\u4e2a\u7ef4\u5ea6\u503c\u4f7f\u7528\u4e00\u4e2a\u9759\u6001\u65b9\u6cd5\u3002\u6807\u51c6 DimensionSetEntity<\/strong> \u5b9e\u4f53\u9700\u8981\u5bf9\u5176\u8fdb\u884c\u6982\u62ec\uff0c\u5e76\u4e14\u4ec5\u4f7f\u7528\u4e00\u4e2a\u590d\u6742\u7684\u65b9\u6cd5\uff0c\u5728\u914d\u7f6e\u597d\u6240\u6709\u7ef4\u5ea6\u540e\uff0c\u4f7f\u7528\u63d2\u4ef6\u52a0\u8f7d\u6240\u6709\u7ef4\u5ea6\uff0c\u8fd9\u4e9b\u7ef4\u5ea6\u4f1a\u81ea\u52a8\u521b\u5efa\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u5b9e\u73b0\u90fd\u6709\u4e0d\u540c\u7684\u7ef4\u5ea6\u2026\u2026\u5728\u6211\u4eec\u7684\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4e0d\u9700\u8981\u989d\u5916\u7684\u590d\u6742\u6027\uff0c\u56e0\u4e3a\u6211\u4eec\u5df2\u7ecf\u77e5\u9053\u5e76\u62e5\u6709\u6211\u4eec\u60f3\u8981\u663e\u793a\u7684\u7ef4\u5ea6\u3002\u4fdd\u6301\u7b80\u5355\uff01<\/p>\n\n\n\n

\u8fd9\u91cc\u6709 3 \u79cd\u65b9\u6cd5\uff08\u6211\u51b3\u5b9a\u5c06\u903b\u8f91\u653e\u5728\u4e00\u79cd\u901a\u7528\u65b9\u6cd5\u4e2d\uff0c\u6240\u4ee5\u6709 4 \u79cd\uff09\u3002<\/p>\n\n\n\n

\npublic class FTDDimensionSetView extends common\n{\n    private static str getSQLStringForDimension(DimensionRefFieldName _dimensionName)\n    {\n        DimensionAttribute dimensionAttribute = DimensionAttribute::findByName(_dimensionName);\n\n        return dimensionAttribute.DimensionValueColumnName;\n    }\n\n    private static str getDepartment()\n    {\n        return FTDDimensionSetView::getSQLStringForDimension(FTDDimensionUtils::Department);\n    }\n\n    private static str getCostCenter()\n    {\n        return FTDDimensionSetView::getSQLStringForDimension(FTDDimensionUtils::CostCenter);\n    }\n\n    private static str getRetailChannel()\n    {\n        return FTDDimensionSetView::getSQLStringForDimension(FTDDimensionUtils::RetailChannel);\n    }\n\n}\n<\/pre>\n\n\n\n

\u5728\u8fd9\u4e9b\u65b9\u6cd5\u4e2d\uff0c\u6211\u4eec\u5c06\u4ece\u914d\u7f6e\u5b83\u4eec\u7684\u8868 DimensionAttribute \u4e2d\u83b7\u53d6 SQL \u4e2d\u7684\u5217\u540d\u79f0\uff08\u5bf9 VS \u9690\u85cf\uff09\u3002\uff08FTDDimensionUtils \u7c7b\u4e2d\u7684\u503c\u53ea\u662f\u8be5\u8868\u7684\u540d\u79f0\u5b57\u6bb5\u7684\u503c\uff09\u3002<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

\u6b65\u9aa4 3\uff1a\u521b\u5efa\u5b57\u7b26\u4e32\u8ba1\u7b97\u5217<\/h3>\n\n\n\n

\u73b0\u5728\uff0c\u6211\u4eec\u521b\u5efa 3 \u4e2a\u65b0\u7684\u8ba1\u7b97\u5217\uff0c\u5e76\u4f7f\u7528\u5c5e\u6027View \u65b9\u6cd5<\/strong>\u5c06\u5b83\u4eec\u4e0e\u4e0a\u9762\u521b\u5efa\u7684\u9002\u5f53\u65b9\u6cd5\u5173\u8054 \u3002<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n
\"\"\/<\/figure>\n\n\n\n

\u5982\u679c\u5728\u540c\u6b65\u6211\u4eec\u7684\u89c6\u56fe\u4e4b\u540e\uff0c\u6211\u4eec\u8f6c\u5230 SQL \u5e76\u67e5\u770b\u5b83\u7684\u8bbe\u8ba1\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u76f4\u89c2\u5730\u4e86\u89e3 \u8ba1\u7b97\u5217<\/strong> \u5b9e\u9645\u4e0a\u662f\u4ec0\u4e48\uff1a<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

\u6b65\u9aa4 4\uff1a\u4ece CustTrans \u6dfb\u52a0\u65b0\u5173\u7cfb<\/h3>\n\n\n\n

\u73b0\u5728\uff0c\u6211\u4eec\u5fc5\u987b\u6dfb\u52a0\u4ece CustTrans \u5230<\/strong> \u89c6\u56fe\u7684\u5173\u7cfb\u3002\u5982\u679c\u60a8\u60f3\u5c06\u8d22\u52a1\u7ef4\u5ea6\u6dfb\u52a0\u5230\u4efb\u4f55\u5176\u4ed6\u8868\u683c\u4e2d\uff0c\u5219\u53ea\u9700\u91cd\u590d\u6267\u884c\u6b64\u6b65\u9aa4\u548c\u6b65\u9aa4 5\uff08\u5c06\u5176\u6dfb\u52a0\u5230\u8868\u5355\uff09\u3002\u56e0\u6b64\uff0c\u6b63\u5982\u6240\u6709\u826f\u597d\u7684\u53d1\u5c55\u4e00\u6837\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u3001\u7b80\u5355\u4e14\u53ef\u91cd\u590d\u4f7f\u7528\u7684\u4ee3\u7801\u7247\u6bb5\uff01<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

\u7b2c 5 \u6b65\uff1a\u5728\u8868\u5355\u4e2d\u4f7f\u7528\u5b83<\/h3>\n\n\n\n

\u5c06\u65b0\u89c6\u56fe\u4f5c\u4e3a\u65b0\u7684\u76f8\u5173\u6570\u636e\u6e90\u6dfb\u52a0\u5230\u8868\u5355\uff0c\u5c06\u5b57\u6bb5\u6dfb\u52a0\u5230\u7f51\u683c…<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

\u77a7\uff01<\/strong> \u8bf7\u6ce8\u610f\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5b83\u4eec\u8fdb\u884c\u7b5b\u9009\uff01\u9700\u6c42\u5339\u914d\uff0c\u5ba2\u6237\u6ee1\u610f<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

\u6211\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u5bf9\u4f60\uff0c\u5306\u5fd9\u7684\u5f00\u53d1\u4eba\u5458\u6709\u6240\u5e2e\u52a9\uff0c\u5c31\u50cf\u6211\u4e4b\u524d\u77e5\u9053\u5b83\u5c31\u4f1a\u5bf9\u6211\u6709\u6240\u5e2e\u52a9\u4e00\u6837\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u4e86\u89e3\u5982\u4f55\u4f7f\u7528\u89c6\u56fe\u5c06\u8d22\u52a1\u7ef4\u5ea6(Financial dimensions)\u663e\u793a\u4e3a\u8868\u5355\u7f51\u683c\u4e2d\u7684\u5b57\u6bb5\uff0c\u8be5\u89c6\u56fe\u5c06\u4f7f\u7528\u8ba1\u7b97\u5217\u76f4\u63a5\u4ece\u8868\u4e2d\u68c0\u7d22\u4fe1\u606f\u3002\u8fd9\u662f\u4e00\u79cd\u5feb\u901f\u83b7\u53d6\u4fe1\u606f\u4ee5\u5c06\u5176\u663e\u793a\u5728\u5217\u8868\u4e2d\u7684\u65b9\u6cd5\uff0c\u5e76\u4e14\u80fd\u591f\u4f7f\u7528\u63a7\u4ef6\u6309\u7ef4\u5ea6\u503c\u8fdb\u884c\u7b5b\u9009\u3002 \u89e3\u51b3\u65b9\u6848\uff1a \u5982\u4f55\u505a\uff1a \u6b65\u9aa4 1\uff1a\u521b\u5efa\u89c6\u56fe \u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u89c6\u56fe ( FTDDimensionSetView )\uff0c\u4f7f\u7528 DimensionAttributeValueSet \u4f5c\u4e3a\u6570\u636e\u6e90\uff0c\u5e76\u6dfb\u52a0 RecId \u4f5c\u4e3a\u89c6\u56fe\u5b57\u6bb5\u3002\u8bf7\u6ce8\u610f\uff0c\u6b64 RecId \u5c06\u662f  \u8868\u4e2d\u6211\u4eec\u60f3\u8981\u663e\u793a\u7ef4\u5ea6\u7684DefaultDimension\u5b57\u6bb5\uff08\u672c\u4f8b\u4e2d\u4e3aCustTrans  \uff09\uff0c\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u6211\u5728\u89c6\u56fe\u4e2d\u4e5f\u5c06\u5176\u547d\u540d\u4e3a DefaultDimension\u3002 \u6b65\u9aa4 2\uff1a\u521b\u5efa\u8ba1\u7b97\u5217\u65b9\u6cd5 \u6211\u4eec\u5c06\u5bf9\u8981\u6dfb\u52a0\u5230\u89c6\u56fe\u4e2d\u7684\u6bcf\u4e2a\u7ef4\u5ea6\u503c\u4f7f\u7528\u4e00\u4e2a\u9759\u6001\u65b9\u6cd5\u3002\u6807\u51c6 DimensionSetEntity \u5b9e\u4f53\u9700\u8981\u5bf9\u5176\u8fdb\u884c\u6982\u62ec\uff0c\u5e76\u4e14\u4ec5\u4f7f\u7528\u4e00\u4e2a\u590d\u6742\u7684\u65b9\u6cd5\uff0c\u5728\u914d\u7f6e\u597d\u6240\u6709\u7ef4\u5ea6\u540e\uff0c\u4f7f\u7528\u63d2\u4ef6\u52a0\u8f7d\u6240\u6709\u7ef4\u5ea6\uff0c\u8fd9\u4e9b\u7ef4\u5ea6\u4f1a\u81ea\u52a8\u521b\u5efa\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u5b9e\u73b0\u90fd\u6709\u4e0d\u540c\u7684\u7ef4\u5ea6\u2026\u2026\u5728\u6211\u4eec\u7684\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4e0d\u9700\u8981\u989d\u5916\u7684\u590d\u6742\u6027\uff0c\u56e0\u4e3a\u6211\u4eec\u5df2\u7ecf\u77e5\u9053\u5e76\u62e5\u6709\u6211\u4eec\u60f3\u8981\u663e\u793a\u7684\u7ef4\u5ea6\u3002\u4fdd\u6301\u7b80\u5355\uff01 \u8fd9\u91cc\u6709 3 \u79cd\u65b9\u6cd5\uff08\u6211\u51b3\u5b9a\u5c06\u903b\u8f91\u653e\u5728\u4e00\u79cd\u901a\u7528\u65b9\u6cd5\u4e2d\uff0c\u6240\u4ee5\u6709 4 \u79cd\uff09\u3002 public class FTDDimensionSetView extends common { private static str getSQLStringForDimension(DimensionRefFieldName _dimensionName) { DimensionAttribute dimensionAttribute = DimensionAttribute::findByName(_dimensionName); return dimensionAttribute.DimensionValueColumnName; } private static str getDepartment() { return FTDDimensionSetView::getSQLStringForDimension(FTDDimensionUtils::Department); } private static str getCostCenter() { return FTDDimensionSetView::getSQLStringForDimension(FTDDimensionUtils::CostCenter); } private static str …<\/p>\n

Continue reading ‘\u5982\u4f55\u5728D365FO\u4f7f\u7528\u89c6\u56fe\u5728\u7a97\u4f53\u4e0a\u663e\u793a\u67d0\u4e00\u4e2a\u8d22\u52a1\u7ef4\u5ea6(Financial dimensions)’ »<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[45],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/dev-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/posts\/829"}],"collection":[{"href":"https:\/\/dev-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dev-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/comments?post=829"}],"version-history":[{"count":19,"href":"https:\/\/dev-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/posts\/829\/revisions"}],"predecessor-version":[{"id":891,"href":"https:\/\/dev-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/posts\/829\/revisions\/891"}],"wp:attachment":[{"href":"https:\/\/dev-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/media?parent=829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/categories?post=829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/tags?post=829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}