{"id":1244,"date":"2024-08-12T12:48:20","date_gmt":"2024-08-12T12:48:20","guid":{"rendered":"https:\/\/markedcode.com\/?p=1244"},"modified":"2025-04-07T11:47:55","modified_gmt":"2025-04-07T11:47:55","slug":"d365-fo-entity-method-sequence","status":"publish","type":"post","link":"https:\/\/markedcode.com\/index.php\/2024\/08\/12\/d365-fo-entity-method-sequence\/","title":{"rendered":"D365 F&amp;O Entity method sequence"},"content":{"rendered":"\n<p>I often get asked by developers where to best put code on data entities for various import and export use cases. When this occurs I always share this image that I have been holding on to for years to show case the method sequence data entities go through.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"559\" src=\"https:\/\/markedcode.com\/wp-content\/uploads\/2024\/07\/image-3.png\" alt=\"\" class=\"wp-image-1246\" srcset=\"https:\/\/markedcode.com\/wp-content\/uploads\/2024\/07\/image-3.png 624w, https:\/\/markedcode.com\/wp-content\/uploads\/2024\/07\/image-3-300x269.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure><\/div>\n\n\n<p>This image provides a few important take aways:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The postLoad method is the recommended method for setting virtual fields when exporting data.<\/li>\n\n\n\n<li>The mapEntityDataSource method is a commonly used method to set values of fields on DMF imports.<\/li>\n\n\n\n<li>The postLoad method is called by the import process. This is important because any custom logic to set fields on export can slow down the import process on that entity.<\/li>\n\n\n\n<li>Be careful using methods such as postTargetProcess because this is called for each thread if you are importing with mulithreading.<\/li>\n<\/ul>\n\n\n\n<p>Keep reading about D365 tips and tricks here:&nbsp; <a href=\"https:\/\/markedcode.com\/index.php\/category\/d365\/\">https:\/\/markedcode.com\/index.php\/category\/d365\/<\/a><\/p>\n\n\n\n<p>For technical questions, please visit <a href=\"https:\/\/d365techsupport.com\" data-type=\"link\" data-id=\"https:\/\/d365techsupport.com\">https:\/\/d365techsupport.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I often get asked by developers where to best put code on data entities for various import and export use cases. When this occurs I always share this image that I have been holding on to for years to show case the method sequence data entities go through. This image provides a few important take<\/p>\n","protected":false},"author":1,"featured_media":1256,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[7,9],"tags":[6,50],"class_list":{"0":"post-1244","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-d365","8":"category-tips-and-tricks","9":"tag-d365","10":"tag-x"},"_links":{"self":[{"href":"https:\/\/markedcode.com\/index.php\/wp-json\/wp\/v2\/posts\/1244","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/markedcode.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/markedcode.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/markedcode.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/markedcode.com\/index.php\/wp-json\/wp\/v2\/comments?post=1244"}],"version-history":[{"count":3,"href":"https:\/\/markedcode.com\/index.php\/wp-json\/wp\/v2\/posts\/1244\/revisions"}],"predecessor-version":[{"id":1326,"href":"https:\/\/markedcode.com\/index.php\/wp-json\/wp\/v2\/posts\/1244\/revisions\/1326"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/markedcode.com\/index.php\/wp-json\/wp\/v2\/media\/1256"}],"wp:attachment":[{"href":"https:\/\/markedcode.com\/index.php\/wp-json\/wp\/v2\/media?parent=1244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/markedcode.com\/index.php\/wp-json\/wp\/v2\/categories?post=1244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/markedcode.com\/index.php\/wp-json\/wp\/v2\/tags?post=1244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}