{"id":30927,"date":"2025-05-30T13:47:45","date_gmt":"2025-05-30T13:47:45","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sagex3\/?p=30927"},"modified":"2025-05-30T13:47:45","modified_gmt":"2025-05-30T13:47:45","slug":"implementing-user-specific-access-control-in-sage-x3-for-the-receipt-line-inquiry-screen","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/05\/30\/implementing-user-specific-access-control-in-sage-x3-for-the-receipt-line-inquiry-screen\/","title":{"rendered":"Implementing User-Specific Access Control in Sage X3 for the Receipt Line Inquiry Screen"},"content":{"rendered":"\n<p>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>, the <strong>Receipt Line Inquiry<\/strong> screen allows users to view and manage detailed information about receipt transactions, including inventory receipts, supplier deliveries, and other related data. By default, all users have access to view all records in this screen. However, due to a client requirement, we need to restrict access such that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Regular users<\/strong> can only view their own created entries.<\/li>\n\n\n\n<li><strong>Administrative users<\/strong> retain the ability to view all records.<\/li>\n<\/ul>\n\n\n\n<p>To achieve this, the following steps were implemented:<\/p>\n\n\n\n<p><strong>Step 1: Create a Miscellaneous Table (19100)<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a miscellaneous table (e.g., <strong>19100<\/strong>) to list the user IDs who should have access to view all records.<\/li>\n<\/ul>\n\n\n\n<p><strong>New Stuff:<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/05\/30\/how-to-change-screen-title-using-code-in-sage-x3\/\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/05\/30\/how-to-change-screen-title-using-code-in-sage-x3\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Change Screen Title Using Code in Sage X3<\/a><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/05\/fig1-Misc-Table-1024x367.jpg\" 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\/05\/fig1-Misc-Table-1024x367.jpg\" alt=\"fig1 Misc Table\"><\/a><\/center>\n<font size=\"2\"><center>fig1 Misc Table<\/center><\/font>\n\n\n\n<p><strong>Step 2: Search for the Script Code Related to the Receipt Line Inquiry Screen<\/strong><\/p>\n\n\n\n<p>Navigate to:<br><strong>All \u2192 Development \u2192 Script Dictionary \u2192 Windows \u2192 FCNSCPS<\/strong><\/p>\n\n\n\n<p>Open the CONSCPS2 screen and search for the standard script, i.e., <strong>CNSCPSSTD.<\/strong><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/05\/fig2-CONSCPS2-screen-1024x491.jpg\" 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\/05\/fig2-CONSCPS2-screen-1024x491.jpg\" alt=\"fig2 CONSCPS2 screen\"><\/a><\/center>\n<font size=\"2\"><center>fig2 CONSCPS2 screen<\/center><\/font>\n\n\n\n<p><strong>Step 3: Apply the Access Control Logic<\/strong><\/p>\n\n\n\n<p>In the <strong>LOAD_FILTER<\/strong> event, add the following code:<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/05\/Fig3-Script-Code.jpg\" 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\/05\/Fig3-Script-Code.jpg\" alt=\"Fig3 Script Code\"><\/a><\/center>\n<font size=\"2\"><center>Fig3 Script Code<\/center><\/font>\n\n\n\n<p><strong>Explanation of the Code:<\/strong><br>-> <strong>CHECK Variable:<\/strong> Initializes to 0.<br>-> <strong>Loop through Table 19100:<\/strong> Checks if the current user (GUSER) exists in the table.<br>             -> If the user is found, CHECK is incremented.<br>-> <strong>Access Restriction:<\/strong><br>            -> If the user is <strong>not found<\/strong> in table 19100 (CHECK &lt; 1), the filter condition is applied to restrict records to those created by the current user (CREUSR = GUSER). <\/p>\n\n\n\n<p>           -> If the user <strong>is found<\/strong>, they can view all records.<\/p>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<p>By following these steps, you can efficiently manage user access, ensuring compliance with business rules and enhancing data integrity within Sage X3.<\/p>\n\n\n[about_us_blog_common]\n","protected":false},"excerpt":{"rendered":"<p>In Sage X3, the Receipt Line Inquiry screen allows users to view and manage detailed information about receipt transactions, including inventory receipts, supplier deliveries, and other related data. By default, all users have access to view all records in this screen. However, due to a client requirement, we need to restrict access such that: To\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/05\/30\/implementing-user-specific-access-control-in-sage-x3-for-the-receipt-line-inquiry-screen\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,13],"tags":[3011,4383,3044],"class_list":["post-30927","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","category-integration","tag-inquiry-screen","tag-receipt-line-inquiry","tag-user-restriction"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/30927","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=30927"}],"version-history":[{"count":7,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/30927\/revisions"}],"predecessor-version":[{"id":30934,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/30927\/revisions\/30934"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=30927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=30927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=30927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}