{"id":81,"date":"2019-09-25T13:12:45","date_gmt":"2019-09-25T16:12:45","guid":{"rendered":"https:\/\/pedrotornich.com\/a\/?p=81"},"modified":"2019-09-25T13:13:01","modified_gmt":"2019-09-25T16:13:01","slug":"baseenum-values","status":"publish","type":"post","link":"https:\/\/pedrotornich.com\/a\/2019\/09\/25\/baseenum-values\/","title":{"rendered":"BaseEnum values"},"content":{"rendered":"\n<p>Hey!<\/p>\n\n\n\n<p>In D365FO some BaseEnums doesn&#8217;t have the Enum Value property in its elements.<\/p>\n\n\n\n<div class=\"wp-block-columns has-2-columns is-layout-flex wp-container-core-columns-is-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"862\" height=\"596\" src=\"https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.51.20.png\" alt=\"\" class=\"wp-image-87\" srcset=\"https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.51.20.png 862w, https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.51.20-300x207.png 300w, https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.51.20-768x531.png 768w\" sizes=\"(max-width: 862px) 100vw, 862px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"530\" src=\"https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.51.26-1.png\" alt=\"\" class=\"wp-image-89\" srcset=\"https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.51.26-1.png 702w, https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.51.26-1-300x226.png 300w\" sizes=\"(max-width: 702px) 100vw, 702px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns has-2-columns is-layout-flex wp-container-core-columns-is-layout-2 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"626\" height=\"552\" src=\"https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.50.36-2.png\" alt=\"\" class=\"wp-image-85\" srcset=\"https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.50.36-2.png 626w, https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.50.36-2-300x265.png 300w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"842\" height=\"500\" src=\"https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.50.40-1.png\" alt=\"\" class=\"wp-image-86\" srcset=\"https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.50.40-1.png 842w, https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.50.40-1-300x178.png 300w, https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.50.40-1-768x456.png 768w\" sizes=\"(max-width: 842px) 100vw, 842px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>This happens because the <strong>ABC<\/strong> BaseEnum is extensible.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.59.38.png\" alt=\"\" class=\"wp-image-90\" width=\"412\" height=\"434\" srcset=\"https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.59.38.png 848w, https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.59.38-284x300.png 284w, https:\/\/pedrotornich.com\/a\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-25-at-12.59.38-768x811.png 768w\" sizes=\"(max-width: 412px) 100vw, 412px\" \/><\/figure><\/div>\n\n\n\n<p>To comply with the extension framework Microsoft introduced a new property on BaseEnums that determine if the enum is extensible or not. If the Enum is extensible then its elements will be automatically numbered.<\/p>\n\n\n\n<p>If the enum is not extensible the Enum Values are stored as metadata in the enum XML file.<\/p>\n\n\n\n<p>On the other hand, extensible enums have their values stored in SQL.<\/p>\n\n\n\n<p>Here is a SQL script to help find out extensible enums Enum Values:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">SELECT * FROM ENUMVALUETABLE\nJOIN ENUMIDTABLE ON ENUMVALUETABLE.ENUMID = ENUMIDTABLE.ID\nWHERE ENUMIDTABLE.NAME = 'BaseEnumName'<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Hey! In D365FO some BaseEnums doesn&#8217;t have the Enum Value property in its elements. This happens because the ABC BaseEnum is extensible. To comply with the extension framework Microsoft introduced a new property on BaseEnums that determine if the enum is extensible or not. If the Enum is extensible then [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,4],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-d365fo","category-sql"],"_links":{"self":[{"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/posts\/81"}],"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=81"}],"version-history":[{"count":5,"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":96,"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/posts\/81\/revisions\/96"}],"wp:attachment":[{"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pedrotornich.com\/a\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}