{"id":2330,"date":"2021-02-16T21:50:01","date_gmt":"2021-02-16T18:50:01","guid":{"rendered":"https:\/\/guvensahin.com\/?p=2330"},"modified":"2021-02-16T22:05:15","modified_gmt":"2021-02-16T19:05:15","slug":"dynamics-365-fo-natural-key-olmadan-dataentity-olusturma","status":"publish","type":"post","link":"https:\/\/guvensahin.com\/tr\/dynamics-365-fo-natural-key-olmadan-dataentity-olusturma\/","title":{"rendered":"Dynamics 365 F&#038;O &#8211; Natural Key Olmadan Data Entity Olu\u015fturma"},"content":{"rendered":"\n<p>D365 F&amp;O da DataEntity olu\u015fturmak istedi\u011finizde sihirbaz size bazen &#8220;<strong>The natural key for the table TableName was not found<\/strong>&#8221; diyerek hata verebilir.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_01.png\"><img loading=\"lazy\" decoding=\"async\" width=\"766\" height=\"475\" src=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_01.png\" alt=\"\" class=\"wp-image-2332\" srcset=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_01.png 766w, https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_01-300x186.png 300w\" sizes=\"auto, (max-width: 766px) 100vw, 766px\" \/><\/a><\/figure>\n\n\n\n<p>Bu hatan\u0131n sebebi DataEntity olu\u015fturmak istedi\u011finiz tablonun RecId d\u0131\u015f\u0131nda unique bir Primary Key&#8217;e sahip olmamas\u0131d\u0131r. <strong>AssetTrans<\/strong> gibi transactional veri saklayan bir tablo i\u00e7in DataEntity olu\u015fturmay\u0131 planl\u0131yorsan\u0131z, primary key tan\u0131mlamak m\u00fcmk\u00fcn de\u011fildir. Fakat yinede bu tablolar i\u00e7in DataEntity olu\u015fturabilirsiniz. Keza <strong>GeneralJournalAccountEntryEntity<\/strong>&#8216;sine bakacak olursan\u0131z standartta da b\u00f6yle entity&#8217;ler mevcut.<\/p>\n\n\n\n<p>A\u015fa\u011f\u0131da anlatt\u0131\u011f\u0131m ad\u0131mlar\u0131 izleyerek bu sorunu a\u015fabilirsiniz.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0130\u015flemler<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>DataEntity sihirbaz\u0131nda Primary Key&#8217;e sahip alakas\u0131z herhangi bir tablo se\u00e7in. \u00d6rne\u011fin <strong>CustGroup<\/strong>. B\u00f6ylece sihirbaz hata vermeden di\u011fer a\u015famaya ge\u00e7ecektir.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_02.png\"><img loading=\"lazy\" decoding=\"async\" width=\"764\" height=\"308\" src=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_02.png\" alt=\"\" class=\"wp-image-2335\" srcset=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_02.png 764w, https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_02-300x121.png 300w\" sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/><\/a><\/figure>\n\n\n\n<p>2. Sihirbaz\u0131 istedi\u011finiz herhangi bir alan\u0131 se\u00e7erek tamamlay\u0131n. Bu sayede Entity, Stage tablosu ve Privilege&#8217;lar otomatik olu\u015fmu\u015f olacakt\u0131r. Olu\u015fan bu objeleri s\u0131ras\u0131yla kendi tablomuz i\u00e7in d\u00fczenleyece\u011fiz.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_03.png\"><img loading=\"lazy\" decoding=\"async\" width=\"767\" height=\"574\" src=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_03.png\" alt=\"\" class=\"wp-image-2337\" srcset=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_03.png 767w, https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_03-300x225.png 300w\" sizes=\"auto, (max-width: 767px) 100vw, 767px\" \/><\/a><\/figure>\n\n\n\n<p>3. \u015eimdi Entity&#8217;nin Datasource&#8217;unu istedi\u011fimiz tablo olarak g\u00fcncelleyin. Benim \u00f6rne\u011fimde bu AssetTrans.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_04.png\"><img loading=\"lazy\" decoding=\"async\" width=\"712\" height=\"369\" src=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_04.png\" alt=\"\" class=\"wp-image-2338\" srcset=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_04.png 712w, https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_04-300x155.png 300w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\" \/><\/a><\/figure>\n\n\n\n<p>4. Datasource&#8217;dan istedi\u011finiz alanlar\u0131 Entity&#8217;nin Fields k\u0131sm\u0131na s\u00fcr\u00fckleyin.<\/p>\n\n\n\n<p>5. Tablo ad\u0131 + RecId notasyonunda bir RecId alan yarat\u0131n. \u00d6rne\u011fin <strong>AssetTransRecId<\/strong>. \u0130sim \u00e7ok \u00f6nemli de\u011fil fakat direkt RecId olarak eklemenize sistem izin vermeyecektir. Bu alan\u0131 <strong>EntityKey<\/strong> isimli index&#8217;in i\u00e7ine ekleyin.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_05.png\"><img loading=\"lazy\" decoding=\"async\" width=\"666\" height=\"731\" src=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_05.png\" alt=\"\" class=\"wp-image-2339\" srcset=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_05.png 666w, https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_05-273x300.png 273w\" sizes=\"auto, (max-width: 666px) 100vw, 666px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_06.png\"><img loading=\"lazy\" decoding=\"async\" width=\"392\" height=\"309\" src=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_06.png\" alt=\"\" class=\"wp-image-2340\" srcset=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_06.png 392w, https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_06-300x236.png 300w\" sizes=\"auto, (max-width: 392px) 100vw, 392px\" \/><\/a><\/figure>\n\n\n\n<p>5. Olu\u015fan Entity&#8217;nin <strong>Label<\/strong> ve <strong>FormRef<\/strong> parametrelerini g\u00fcncelleyin. Ayr\u0131ca Privilege&#8217;lara da label vermeyi unutmay\u0131n.<\/p>\n\n\n\n<p>7. Son olarak Entity&#8217;ye sa\u011f t\u0131klay\u0131p <strong>Regenerate staging table<\/strong> diyerek i\u015flemi tamamlayal\u0131m. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_07.png\"><img loading=\"lazy\" decoding=\"async\" width=\"572\" height=\"418\" src=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_07.png\" alt=\"\" class=\"wp-image-2341\" srcset=\"https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_07.png 572w, https:\/\/guvensahin.com\/tr\/wp-content\/uploads\/2021\/02\/d365_data_entity_natural_key_07-300x219.png 300w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Son Olarak<\/h2>\n\n\n\n<p>T\u00fcm yap\u0131lacaklar bu kadard\u0131. Build + Sync sonras\u0131 DataEntity kullan\u0131ma haz\u0131r.<\/p>\n\n\n\n<p>DataEntity ile ilgili di\u011fer yaz\u0131lar\u0131ma <a href=\"https:\/\/guvensahin.com\/tr\/tag\/data-entity\/\">bu adresten<\/a> ula\u015fabilirsiniz.<\/p>\n\n\n\n<p>D365 F&amp;O ile ilgili yaz\u0131lar\u0131ma <a href=\"https:\/\/guvensahin.com\/tr\/category\/dynamics-365\/\">\u015furadan<\/a>, Dynamics AX yaz\u0131lar\u0131ma da <a href=\"https:\/\/guvensahin.com\/tr\/category\/dynamics-ax\/\">buradan<\/a> bakabilirsiniz.<\/p>\n\n\n\n<p>Ho\u015f\u00e7akal\u0131n.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>D365 F&amp;O da DataEntity olu\u015fturmak istedi\u011finizde sihirbaz size bazen &#8220;The natural key for the table TableName was not found&#8221; diyerek hata verebilir. Bu hatan\u0131n sebebi DataEntity olu\u015fturmak istedi\u011finiz tablonun RecId d\u0131\u015f\u0131nda unique bir Primary Key&#8217;e sahip olmamas\u0131d\u0131r. AssetTrans gibi transactional veri saklayan bir tablo i\u00e7in DataEntity olu\u015fturmay\u0131 planl\u0131yorsan\u0131z, primary key tan\u0131mlamak m\u00fcmk\u00fcn de\u011fildir. Fakat yinede&hellip;&nbsp;<a href=\"https:\/\/guvensahin.com\/tr\/dynamics-365-fo-natural-key-olmadan-dataentity-olusturma\/\" rel=\"bookmark\">Daha fazlas\u0131n\u0131 oku &raquo;<span class=\"screen-reader-text\">Dynamics 365 F&#038;O &#8211; Natural Key Olmadan Data Entity Olu\u015fturma<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2345,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[405],"tags":[193,446,394,438,198,285],"class_list":["post-2330","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-365-fo","tag-axapta","tag-data-entity","tag-dynamics-365","tag-dynamics-365-finance-and-operations","tag-dynamics-ax-2","tag-x"],"_links":{"self":[{"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/posts\/2330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/comments?post=2330"}],"version-history":[{"count":7,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/posts\/2330\/revisions"}],"predecessor-version":[{"id":2346,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/posts\/2330\/revisions\/2346"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/media\/2345"}],"wp:attachment":[{"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/media?parent=2330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/categories?post=2330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/tags?post=2330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}