{"id":97,"date":"2019-09-25T13:20:51","date_gmt":"2019-09-25T16:20:51","guid":{"rendered":"https:\/\/pedrotornich.com\/a\/?p=97"},"modified":"2019-09-25T13:21:13","modified_gmt":"2019-09-25T16:21:13","slug":"get-dimension-value-from-default-dimension","status":"publish","type":"post","link":"https:\/\/pedrotornich.com\/a\/2019\/09\/25\/get-dimension-value-from-default-dimension\/","title":{"rendered":"Get Dimension Value From Default Dimension"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code lang=\"csharp\" class=\"language-csharp line-numbers\">static void getDimensionValueFromDefaultDimension(Args _args)\n{\n    #define.DimensionName('MyCustomDim')\n    DimensionAttributeValueSetItem dimAttrValueSetItem;\n    DimensionAttributeValue dimAttrValue;\n    DimensionAttribute dimAttr = DimensionAttribute::findByName(#DimensionName);\n\n    str dimensionValue;\n    ProjTable projTable;\n\n    projTable = ProjTable::find('DummyProjId');\n\n    select firstOnly DisplayValue from dimAttrValueSetItem\n        where dimAttrValueSetItem.DimensionAttributeValueSet == projTable.DefaultDimension\n        exists join dimAttrValue\n            where dimAttrValue.RecId == dimAttrValueSetItem.DimensionAttributeValue\n            &amp;&amp; dimAttrValue.DimensionAttribute == dimAttr.RecId;\n\n    dimensionValue = dimAttrValueSetItem.DisplayValue;\n\n    info(dimensionValue);\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-ax2012"],"_links":{"self":[{"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/posts\/97"}],"collection":[{"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":1,"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"predecessor-version":[{"id":98,"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/posts\/97\/revisions\/98"}],"wp:attachment":[{"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}