{"id":9582,"date":"2016-11-30T09:04:23","date_gmt":"2016-11-30T09:04:23","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagex3\/?p=9582"},"modified":"2024-11-26T09:06:17","modified_gmt":"2024-11-26T09:06:17","slug":"how-to-delete-a-record-in-sage-x3-by-using-table-index-key","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2016\/11\/30\/how-to-delete-a-record-in-sage-x3-by-using-table-index-key\/","title":{"rendered":"How to Delete a Record in Sage X3 by using Table Index (Key)"},"content":{"rendered":"<p style=\"text-align: justify;\">There is multiple way of deleting a record in <a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/\" target=\"_blank\" rel=\"noopener\">Sage X3<\/a>. If we do not delete the record using the index the database must read the full table to find the rows to be deleted. That means deleting the row would be fast but finding would be very slow. \u2018DeleteByKey\u2019 instruction deletes a record at a given key after checking for edit conflicts. It compares the\u00a0<a href=\"http:\/\/online-help.sageerpx3.com\/erp\/wp-static-content\/static-pages\/en_US\/v7dev\/4gl_glossary-updtick.html\" target=\"_blank\" rel=\"noopener\">UpdTick<\/a>\u00a0value of the [F] record with the UpdTick of the corresponding database record and it deletes the database record only if the two ticks are equal.<\/p>\n<p style=\"text-align: justify;\">Syntax:<\/p>\n<p style=\"text-align: justify;\">DeleteByKey [ABV]KEY = KEY_VALUE<\/p>\n<p style=\"text-align: justify;\">DeleteByKey KEY = KEY_VALUE<\/p>\n<p style=\"text-align: justify;\">\u2022\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ABV is the abbreviation of a table. It must match a File declaration.<\/p>\n<p style=\"text-align: justify;\">\u2022\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 KEY is the description of the key used to access to the table. It can have one of the following syntax:<\/p>\n<p style=\"text-align: justify; padding-left: 30px;\">o\u00a0\u00a0 KEYVAR where KEYVAR is the code of a key declared in the dictionary or the name of a temporary index from an Order by Key clause.<\/p>\n<p style=\"text-align: justify; padding-left: 30px;\">o\u00a0\u00a0 KEYVAR(INDEX) where INDEX is a numeric expression giving the number of key parts considered for the condition.<\/p>\n<p style=\"text-align: justify;\">\u2022\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 KEY_VALUE is a list of expressions separated by semicolons.<\/p>\n<p style=\"text-align: justify;\">All these elements are optional.<\/p>\n<p style=\"text-align: justify;\">Kindly refer to the below screenshot for the code snippet:<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2016\/11\/Delete-a-Record-in-Sage-X3.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-9583\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2016\/11\/Delete-a-Record-in-Sage-X3.png\" alt=\"Delete a Record in Sage X3\" width=\"634\" height=\"47\" \/><\/a><\/p>\n<p>Hope this blogs helps you!<\/p>\n<p><strong>About Us:<\/strong><\/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 customizations, data migration, system integrations, third party add-on development and implementation expertise.<\/p>\n<p><a href=\"http:\/\/www.greytrix.com\/\" target=\"_blank\" rel=\"noopener\">Greytrix<\/a>\u00a0have some unique solutions of\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-x3-integration\" target=\"_blank\" rel=\"noopener\">Sage X3\u2019s integration with Sage CRM<\/a>,\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/sage-x3\/gumu-x3-salesforce-integration\" target=\"_blank\" rel=\"noopener\">Salesforce.com<\/a>\u00a0and\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/magento-sage-integrations\/sage-x3-magento\" target=\"_blank\" rel=\"noopener\">Magento eCommerce<\/a>. It also offers best-in-class\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\" target=\"_blank\" rel=\"noopener\">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\" rel=\"noopener\">x3@greytrix.com<\/a>\u00a0.We will be glad to assist you.<\/p>\n<p>Also Read:<\/p>\n<p>&#8211;\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2016\/08\/08\/how-to-delete-element-from-an-array\/\">How to Delete Element from an Array?<\/a><\/p>\n<p>&#8211;\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2014\/06\/30\/how-to-get-the-number-of-records-which-is-deleted-by-delete-command\/\">How to get the number of records which is deleted by Delete Command?<\/a><\/p>\n<p>&#8211;\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2014\/06\/30\/how-to-delete-particular-row-and-reset-grid\/\">How to Delete particular row and reset Grid<\/a><\/p>\n<p>&#8211;\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2013\/01\/23\/delete-folder-in-sage-x3\/\">Delete Folder in Sage X3<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is multiple way of deleting a record in Sage X3. If we do not delete the record using the index the database must read the full table to find the rows to be deleted. That means deleting the row would be fast but finding would be very slow. \u2018DeleteByKey\u2019 instruction deletes a record at\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2016\/11\/30\/how-to-delete-a-record-in-sage-x3-by-using-table-index-key\/\">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":[546,1942,1943,2317],"class_list":["post-9582","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","tag-delete-a-record-in-sage-x3","tag-sage-x3-technical-assistance","tag-sage-x3-technical-blog","tag-updtick-value"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/9582","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=9582"}],"version-history":[{"count":1,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/9582\/revisions"}],"predecessor-version":[{"id":30239,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/9582\/revisions\/30239"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=9582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=9582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=9582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}