How to Delete a Record in Sage X3 by using Table Index (Key)

By | November 30, 2016

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. ‘DeleteByKey’ instruction deletes a record at a given key after checking for edit conflicts. It compares the UpdTick value 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.




•          ABV is the abbreviation of a table. It must match a File declaration.

•          KEY is the description of the key used to access to the table. It can have one of the following syntax:

o   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.

o   KEYVAR(INDEX) where INDEX is a numeric expression giving the number of key parts considered for the condition.

•          KEY_VALUE is a list of expressions separated by semicolons.

All these elements are optional.

Kindly refer to the below screenshot for the code snippet:

Delete a Record in Sage X3

Hope this blogs helps you!

About Us:

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.

Greytrix have some unique solutions of Sage X3’s integration with Sage and Magento eCommerce. It also offers best-in-class Sage X3 customization and development services to Sage business partners, end users, and Sage PSG worldwide.

For more information on Sage X3 Integration and Services, please contact us at .We will be glad to assist you.

Also Read:

– How to Delete Element from an Array?

– How to get the number of records which is deleted by Delete Command?

– How to Delete particular row and reset Grid

– Delete Folder in Sage X3