{"id":31629,"date":"2025-12-30T13:06:12","date_gmt":"2025-12-30T13:06:12","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sagex3\/?p=31629"},"modified":"2025-12-30T13:06:12","modified_gmt":"2025-12-30T13:06:12","slug":"how-to-update-custom-fields-in-the-work-order-wo-header-table-mfghead-in-sage-x3","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/12\/30\/how-to-update-custom-fields-in-the-work-order-wo-header-table-mfghead-in-sage-x3\/","title":{"rendered":"How to Update Custom Fields in the Work Order (WO) Header Table (MFGHEAD) in Sage X3"},"content":{"rendered":"\n<p>In many manufacturing setups, businesses often require custom information to flow seamlessly from Sales Orders (SO) into Work Orders (WO). Recently, one of our clients needed an additional alphanumeric field (length 50) on the Sales Order header called <strong>\u201cSpecial Notes\u201d<\/strong>, and they wanted this field to automatically carry forward to the Work Order header during WO creation in <a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/development-services\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/sage-x3-erp\/development-services\/\" rel=\"noreferrer noopener\">Sage X3<\/a>.<\/p>\n\n\n\n<p>While this requirement sounds simple, challenges appeared specifically when Work Orders were created through <strong>Multilevel Planning<\/strong>. This blog explains the complete solution covering field creation, screen changes, script logic, and the special handling required for automated planning scenarios.<\/p>\n\n\n\n<p><strong>Step 1: Adding the Custom Field on the Sales Order<\/strong><\/p>\n\n\n\n<p>To begin, we added a new custom field <strong>ZSPCLNOTE<\/strong> to the <strong>SORDER<\/strong> table.<br>This field was then placed on the Sales Order screen under the Management tab.<\/p>\n\n\n\n<p><strong>New stuff:<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/12\/30\/managing-repeated-data-and-line-suppression-using-next-previous-functions-in-crystal-reports\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/12\/30\/managing-repeated-data-and-line-suppression-using-next-previous-functions-in-crystal-reports\/\" rel=\"noreferrer noopener\">Managing Repeated Data and Line Suppression Using Next() &amp; Previous() Functions in Crystal Reports<\/a><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/12\/fig1-Sales-Order-screen.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/12\/fig1-Sales-Order-screen.png\" alt=\"fig1 Sales Order screen\"><\/a><\/center>\n<font size=\"2\"><center>fig1 Sales Order screen<\/center><\/font>\n\n\n\n<p><strong>Step 2: Adding the Field to the Work Order Header<\/strong><\/p>\n\n\n\n<p>Next, we created the same field <strong>ZSPCLNOTE<\/strong> on the <strong>MFGHEAD<\/strong> table.<br>We added this field to the Work Order header screen to ensure visibility for users.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/12\/fig2-Work-Order-screen.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/12\/fig2-Work-Order-screen.png\" alt=\"fig2 Work Order screen\"><\/a><\/center>\n<font size=\"2\"><center>fig2 Work Order screen<\/center><\/font>\n\n\n\n<p><strong>Step 3: Ensuring Data Flows from SO to WO<\/strong><\/p>\n\n\n\n<p>To make the \u201cSpecial Notes\u201d value flow from the Sales Order to the Work Order during manual WO creation, we added custom logic in the <strong>SPEMFG<\/strong> script under the <strong>SETBOUT<\/strong> action.<\/p>\n\n\n\n<p>This worked perfectly for manually created Work Orders\u2014the data passed correctly and was saved in the MFGHEAD table.<\/p>\n\n\n\n<p><strong>Issue: Value Not Saved During Multilevel Planning<\/strong><\/p>\n\n\n\n<p>However, a problem occurred when Work Orders were generated using the <strong>Multilevel Planning<\/strong> function available under <strong>Sales Order \u2192 Details<\/strong>.<\/p>\n\n\n\n<p>Although the value flowed from SO to WO during planning, it <strong>did not get saved<\/strong> in the <strong>MFGHEAD<\/strong> table.<\/p>\n\n\n\n<p>This happened because Multilevel Planning uses automated processes that do not trigger the same script actions as manual WO creation.<\/p>\n\n\n\n<p><strong>Step 4: Fix for Multilevel Planning Scenario<\/strong><\/p>\n\n\n\n<p>To resolve this, we created the entry point <strong>MFGAUTLIB<\/strong> and attached a custom script <strong>ZMFGDET<\/strong> to it.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/12\/fig3-Entry-Point-1024x133.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/12\/fig3-Entry-Point-1024x133.png\" alt=\"fig3 Entry Point\"><\/a><\/center>\n<font size=\"2\"><center>fig3 Entry Point<\/center><\/font>\n\n\n\n<p>Inside this script, we implemented custom logic under the <strong>AUTLIBMAJ<\/strong> action.<br>This ensures that the \u201cSpecial Notes\u201d value is properly written into the <strong>MFGHEAD<\/strong> table even when the Work Order is created automatically via Multilevel Planning.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/12\/fig4-Multilevel-planning-option-1024x394.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/12\/fig4-Multilevel-planning-option-1024x394.png\" alt=\"fig4 Multilevel planning option\"><\/a><\/center>\n<font size=\"2\"><center>fig4 Multilevel planning option<\/center><\/font>\n\n\n\n<p><strong>Conclusion:<\/strong><br>By leveraging entry points and custom script logic, we ensured that the \u201cSpecial Notes\u201d field flows correctly from the Sales Order to the Work Order\u2014whether the Work Order is created manually or through automated Multilevel Planning.<\/p>\n\n\n\n<p>This customization ensures consistent data visibility, improved traceability, and enhanced process efficiency across the manufacturing lifecycle.<\/p>\n\n\n[about_us_blog_common]\n","protected":false},"excerpt":{"rendered":"<p>In many manufacturing setups, businesses often require custom information to flow seamlessly from Sales Orders (SO) into Work Orders (WO). Recently, one of our clients needed an additional alphanumeric field (length 50) on the Sales Order header called \u201cSpecial Notes\u201d, and they wanted this field to automatically carry forward to the Work Order header during\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/12\/30\/how-to-update-custom-fields-in-the-work-order-wo-header-table-mfghead-in-sage-x3\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,13],"tags":[3318,493,1822,1983,2428],"class_list":["post-31629","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","category-integration","tag-custom-fields","tag-customization","tag-sage-x3","tag-sales-order","tag-work-order"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/31629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/comments?post=31629"}],"version-history":[{"count":8,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/31629\/revisions"}],"predecessor-version":[{"id":31637,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/31629\/revisions\/31637"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=31629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=31629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=31629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}