{"id":26383,"date":"2023-04-01T06:52:33","date_gmt":"2023-04-01T06:52:33","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sagex3\/?p=26383"},"modified":"2024-12-03T04:45:33","modified_gmt":"2024-12-03T04:45:33","slug":"technical-how-to-perform-crud-operations-using-classes-and-representations-in-sage-x3-v12","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2023\/04\/01\/technical-how-to-perform-crud-operations-using-classes-and-representations-in-sage-x3-v12\/","title":{"rendered":"How to perform CRUD operations using classes and representations in Sage X3 V12"},"content":{"rendered":"\n<p><strong><u>Introduction:<\/u><\/strong><\/p>\n\n\n\n<p>Sage X3 provides various features with user friendly screens and their amazing functionalities. The screens can be of various types such object based, function action based, inquiry screens , etc. For performing create, read, update and delete operations on a table, we need to have a screen for entering those data but what if there is a requirement where the user does not have any screen and have to perform CRUD operations on a particular table.This can be achieved by one of the features provided by Sage X3 using classes and representations concepts.<\/p>\n\n\n\n<p>In this blog we will perform the basic read and write operations using classes and representation instead of creating objects and screens. Consider an example where the user wants to perform CRUD operations on a table.<\/p>\n\n\n\n<p>Navigate to All -&gt; Development -&gt; Data and parameters -&gt; Tables<\/p>\n\n\n\n<p>Create a new table with some sample fields as shown in below figure.<\/p>\n\n\n\n\n\n<p>Navigate to All -&gt; Development -&gt; Data and parameters -&gt; Classes<\/p>\n\n\n\n<p>Create a new class, enter the class code , select type as \u201cPersistent\u201d, table-view as table created earlier as well as the index code, as shown in below figure.<br><br><\/p>\n\n\n\n\n\n<p>Go to the \u201cProperties\u201d tab and click on the action button (3 dots) and select the \u201cColumn selection\u201d option as shown in the figure below.<\/p>\n\n\n\n\n\n<p><\/p>\n\n\n\n<p>As shown in below figure, after selecting the \u201cColumn selection\u201d option, the screen below will appear. Check the fields and select \u201cYes\u201d in the \u201cY\/N\u201d column and click on the \u201cOK\u201d button&nbsp; so that these fields will be included from the table created earlier into the class.<\/p>\n\n\n\n\n\n<p>Now, create the class , go to the \u201cStandard methods\u201d tab and select the methods the user needs to perform such as creation, read, deletion, etc. as shown in the below figure.<\/p>\n\n\n\n\n\n<p>Click on \u201cSave\u201d ,\u201cValidation\u201d and \u201cGlobal Validation\u201d buttons.<\/p>\n\n\n\n<p>Next, we need to create a representation for this class.<\/p>\n\n\n\n<p>Navigate to All -&gt; Development -&gt; Data and parameters -&gt; Representations<\/p>\n\n\n\n<p>Enter the representation code, description and class code as shown in below figure. (Note : Instance will be added automatically.)<\/p>\n\n\n\n\n\n<p>Go to Managed behaviors block in the \u201cGeneral\u201d tab and ensure creation, update and deletion checkboxes are checked active or not, if not make them \u201cActive\u201d.<\/p>\n\n\n\n<p>Next, go to the \u201cOrganization\u201d tab, create sections and blocks as shown below, later on you will see how they will look when the user opens the representation.<\/p>\n\n\n\n\n\n<p>Now, go to the \u201cDisplayed properties\u201d tab and click on the action button (3 dots) and select \u201cselection\u201d option and the below screen will appear.<\/p>\n\n\n\n\n\n<p>Select \u201cQuery\u201d , \u201cDetail\u201d, \u201cEdit\u201d, \u201cEnterable\u201d options as \u201cYes\u201d and \u201cInitial status\u201d as \u201cVisible\u201d and then click on the \u201cOK\u201d button.<\/p>\n\n\n\n<p>The user will be able to see the below screen and can select the block wanted to be displayed on whether header or detail facet.<\/p>\n\n\n\n\n\n<p>In future if needed to add more fields in the table, they can be added similarly as above in the classes and representations.<\/p>\n\n\n\n<p>Click on \u201cSave\u201d, \u201cValidation\u201d and then \u201cGlobal Validation\u201d for effecting the changes done in representation.<\/p>\n\n\n\n<p>Next, create a menu item with \u201cLink Type\u201d as \u201cRepresentation\u201d , in \u201cRepresentation\u201d option , enter the representation code (here \u201cYRTEST\u201d) and in \u201cEntity\u201d option, enter the class code (here \u201cYCTEST\u201d) and add it in the navigation pages where the user wants to be accessed.<\/p>\n\n\n\n<p>After clicking on the menu item, the user will be able to see the below screen where the user can create and edit the records with header &amp; detail information.<\/p>\n\n\n\n\n\n<p>In this way, the user can perform CRUD operations using classes and representations without creating screens and objects.<\/p>\n\n\n\n<p>This blog helps us to understand how the user can perform CRUD operations using classes and representations without creating screens and objects.<\/p>\n\n\n\n<p><strong>About Us<\/strong><br>Greytrix &#8211; a globally recognized Premier Sage Gold Development Partner is a one-stop solution provider for Sage ERP and Sage CRM needs. Being recognized and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development and implementation expertise.<\/p>\n\n\n\n<p>Greytrix caters to a wide range of Sage X3 (Sage Enterprise Management) offerings &#8211; a Sage Business Cloud Solution. Our unique GUMU&#x2122; integrations include Sage X3 for Sage CRM, Salesforce.com and Magento eCommerce along with Implementation and Technical Support worldwide for Sage X3 (Sage Enterprise Management). Currently we are Sage X3 Implementation Partner in East Africa, Middles East, Australia, Asia. We also offer best-in-class Sage X3 customization and development services, integrated applications such as POS | WMS | Payment Gateway | Shipping System | Business Intelligence | eCommerce and have developed add-ons such as Catch \u2013 Weight and Letter of Credit for Sage X3 to Sage business partners, end users and Sage PSG worldwide.<\/p>\n\n\n\n<p>Greytrix is a recognized Sage Rockstar ISV Partner for GUMU&#x2122; Sage X3 &#8211; Sage CRM integration also listed on Sage Marketplace; GUMU&#x2122; integration for Sage X3 &#8211; Salesforce is a 5-star app listed on Salesforce AppExchange.<\/p>\n\n\n\n<p>For more information on Sage X3 Integration and Services, please contact us at mailto: x3@greytrix.com. We will be glad to assist you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Sage X3 provides various features with user friendly screens and their amazing functionalities. The screens can be of various types such object based, function action based, inquiry screens , etc. For performing create, read, update and delete operations on a table, we need to have a screen for entering those data but what if\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2023\/04\/01\/technical-how-to-perform-crud-operations-using-classes-and-representations-in-sage-x3-v12\/\">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,3162,13,3642,10,2796,11],"tags":[3319,1271,3542,1839,2871,2233,3735],"class_list":["post-26383","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","category-greytrix","category-integration","category-sage-x3","category-standard","category-technical","category-tips","tag-classes","tag-menu-items","tag-representations","tag-sage-x3-blogs","tag-sage-x3-functional-blogs","tag-tables","tag-x3-blogs"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/26383","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=26383"}],"version-history":[{"count":5,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/26383\/revisions"}],"predecessor-version":[{"id":30375,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/26383\/revisions\/30375"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=26383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=26383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=26383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}