{"id":9235,"date":"2016-08-25T11:21:41","date_gmt":"2016-08-25T11:21:41","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagex3\/?p=9235"},"modified":"2016-08-25T11:21:41","modified_gmt":"2016-08-25T11:21:41","slug":"how-to-open-a-screen-when-single-object-is-bound-with-multiple-screens","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2016\/08\/25\/how-to-open-a-screen-when-single-object-is-bound-with-multiple-screens\/","title":{"rendered":"How to Open a Screen, when Single Object is bound with Multiple Screens?"},"content":{"rendered":"<p>If we want a particular screen to open among several screens, where single object is bound with the multiple screens then Sage X3 provides a functionality for the same.<\/p>\n<p>To access screen using Code check below link:<\/p>\n<p><span style=\"color: #0000ff\">&#8211;\u00a0<\/span><span style=\"text-decoration: underline;color: #0000ff\"><a style=\"color: #0000ff;text-decoration: underline\" href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2014\/01\/30\/how-to-access-screen-using-code\/\">https:\/\/www.greytrix.com\/blogs\/sagex3\/2014\/01\/30\/how-to-access-screen-using-code\/<\/a><\/span><\/p>\n<p>Now, let\u2019s see how we will get the required screen based on certain conditions. If you have variable R1 and based on its value, you want to open an object based screen, where object is bound with multiple screens. E.g. take object as BOD which is bound with Commercial BOMs and Production BOMs.<\/p>\n<p>Let\u2019s say we want to open the Commercial BOMs screen when R1=1 else open Production BOMs screen.<\/p>\n<p><strong>Here is code:<\/strong><\/p>\n<p>If R1 =1<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 Local Char PARBOUT(250)(1..20)<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 Local Integer FLGEXE : FLGEXE = 1<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 PARBOUT(1) = &#8220;&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 PARBOUT(2) = &#8220;BOD&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 PARBOUT(3) = &#8220;&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 GACTION = &#8220;GOBJETC1&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 GFONCTION = &#8220;GESBODC&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 GFONBOD=&#8221;BOMC&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 GDATEREF=date$<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 Call OBJET_CHAR(PARBOUT(1),PARBOUT(2) ,PARBOUT(3)) From GOBJET<\/p>\n<p>\u00a0 Else<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 Local Char PARBOUT(250)(1..20)<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 Local Integer FLGEXE : FLGEXE = 1<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 PARBOUT(1) = &#8220;&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 PARBOUT(2) = &#8220;BOD&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 PARBOUT(3) = &#8220;&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 GACTION = &#8220;GOBJETC1&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 GFONCTION = &#8220;GESBODP&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 GFONBOD=&#8221;BOMP&#8221;<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 GDATEREF=date$<\/p>\n<p style=\"padding-left: 30px\">\u00a0\u00a0\u00a0 Call OBJET_CHAR(PARBOUT(1),PARBOUT(2) ,PARBOUT(3)) From GOBJET<\/p>\n<p style=\"padding-left: 30px\">\u00a0 Endif<\/p>\n<p><u>Explanation:<\/u> If we noticed the code is same as opening the normal screen except few additional parameter where set is GFONCTION, GFONBOD, GDATEREF.<\/p>\n<p><u>Setup:<\/u><\/p>\n<p>1) <u>GFONCTION<\/u><u>:<\/u> In GFONCTION, set the function code of the screen which supposed to open, Say function code for opening the production screen is &#8220;GESBODP&#8221;.<\/p>\n<p>2) <u>GFONBOD<\/u><u>:<\/u> GFONBOD is a global variable, which is generally included in the variable section of the function and its value varies. GFONBOD variable is just name, you may create your own variable and use that variable in different functions, usually we create such variable to link a set of screen which we are supposed to open based on function code and variable value.<\/p>\n<p><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2016\/08\/GFONBOD-set.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter  wp-image-9236\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2016\/08\/GFONBOD-set.png\" alt=\"GFONBOD set\" width=\"679\" height=\"458\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Say GFONBOD value for opening the production screen is &#8220;BOMP&#8221;.<\/p>\n<p>3) <u>GDATEREF<\/u>: It\u2019s just another global variable where we have to set its value to the current date.<\/p>\n<p>4) <u>PARBOUT(2)<\/u>:\u00a0 It consists of an object code, which may bound with set of screens.<\/p>\n<p>Hope this blog helps!<\/p>\n<h5 style=\"text-align: center\"><span style=\"text-decoration: underline\"><span style=\"color: #08968b\"><strong>About Us<\/strong><\/span><\/span><\/h5>\n<p>&nbsp;<\/p>\n<p>Greytrix is one stop solution provider for Sage ERP and Sage CRM needs. We provide complete end-to-end assistance for your technical consultations, product, system integrations, third party add-on development and implementation expertise.<\/p>\n<p><a href=\"http:\/\/www.greytrix.com\/\" target=\"_blank\">Greytrix<\/a>\u00a0have some unique solutions of\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-x3-integration\" target=\"_blank\">Sage X3\u2019s integration with Sage CRM<\/a>,\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/sage-x3\/gumu-x3-salesforce-integration\" target=\"_blank\">Salesforce.com<\/a>\u00a0and\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/magento-sage-integrations\/sage-x3-magento\" target=\"_blank\">Magento eCommerce<\/a>. It also offers best-in-class\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\" target=\"_blank\">Sage X3 customization and development services<\/a>\u00a0to Sage business partners, end users, and Sage PSG worldwide.<\/p>\n<p>For more information on Sage X3 Integration and Services, please contact us at\u00a0<a href=\"mailto:x3@greytrix.com\" target=\"_blank\">x3@greytrix.com<\/a>\u00a0.We will be glad to assist you.<\/p>\n<p><strong><em>Other Related Blogs:<\/em><\/strong><\/p>\n<p>&#8211;\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2015\/11\/25\/how-to-open-the-object-managed-screen-via-code\/\">How to open the object managed screen via code?<\/a><\/p>\n<p>&#8211;\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2014\/01\/30\/how-to-access-screen-using-code\/\">How to access screen using Code?<\/a><\/p>\n<p>&#8211;\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2012\/09\/21\/passing-parameters-to-your-pop-up-window-in-sage-x3\/\">Passing Parameters to your Pop Up Window in Sage X3<\/a><\/p>\n<p>&#8211;\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2014\/10\/30\/how-to-open-sage-erp-x3-code-file-in-eclipse-folder-in-version-7\/\">How to open Sage ERP X3 Code file in eclipse folder in version 7<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If we want a particular screen to open among several screens, where single object is bound with the multiple screens then Sage X3 provides a functionality for the same. To access screen using Code check below link: &#8211;\u00a0https:\/\/www.greytrix.com\/blogs\/sagex3\/2014\/01\/30\/how-to-access-screen-using-code\/ Now, let\u2019s see how we will get the required screen based on certain conditions. If you have\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2016\/08\/25\/how-to-open-a-screen-when-single-object-is-bound-with-multiple-screens\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[868,891,892,924,1377,1428,1839,1881,2112],"class_list":["post-9235","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","tag-gdateref","tag-gfonbod","tag-gfonction","tag-greytrix-blogs","tag-open-a-screen","tag-parbout","tag-sage-x3-blogs","tag-sage-x3-functionality","tag-single-object-bound-multiple-screens"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/9235","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/comments?post=9235"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/9235\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=9235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=9235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=9235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}