How do I get the modified objects from the Genexus KB database?


Good morning people,

I need to obtain the objects (WebPanels, Procedures, etc) modified on a certain date but without opening Genexus. In other words, using the database of the KB. I've been analyzing the tables for days but I have several versions which makes everything more complicated. Any idea or someone who has worked with something similar? Thank you very much and I await your comments.

Thanks for your response. I agree with everything you raise. I tell you the requirement. There are two KBs for each application that we have in the company, one for QA and another for Production. For administrative matters of the company, it is necessary to give security to the Production KBs, in such a way that no one can access them and that the builds and imports of .XPZs are done in a controlled manner. For that, an application has been built with the MsBuild and everything works fine here. The problem is that the auditors need to compare the report that returns our application (which is nothing more than the objects that have been read in each imported .XPZ) with the result of doing Ctrl + O and filter by a certain date. You do not need to change anything in those tables, we also know that there is all the knowledge of Genexus and if something moves, it will stop working. In conclusion all that is required is to obtain a report of the modified objects on a certain date any ideas or tools that you can use? I really appreciate your response Fede.

asked by Jose Rascon 03.10.2016 в 19:43

1 answer


The appropriate way to solve your query is using the GeneXus SDK.

The scheme of tables and the semantics of the data in each of them is not something that we want to expose. Improper manipulation of the data in the KB database can cause a KB to no longer open, or cause inadvertent loss of data.

On the side of solving it using the GeneXus SDK, that is something that we support, and we make sure to provide compatibility or clear mechanisms of incompatibility detection and conversion need.

I understand that you want to avoid opening the KB, but unfortunately it is not possible to avoid it. All queries through the SDK need access to an open KB. If the requirement to NOT open the KB is because you want to be independent of user dialogs (for example, because you need to run a task in a batch way), you can implement your query as a msbuild task that accesses the open KB (which should be opened with the task msbuild OpenKnowledgeBase ), or by lifting the GeneXus BL manually (as it does the example of a command application that uses the GeneXus SDK).

If you want more information on how to solve the specific query (this or others) using the SDK, I invite you to send us questions.


Here is a brief example of how to obtain modified objects after a certain date.

Assuming you have already accessed the KB, and you get the KBModel on which to query.

KBModel model = ....; // Obtener el modelo en donde consultar de alguna forma
DateTime afterTimestamp = ....; // Definir la fecha a partir de dónde se quiere buscar cambios
IEnumerable<EntityKey> modifiedAfterKeys = model.Objects.GetKeys(afterTimestamp);

// Agregar los objetos con las keys anteriores a una lista
List<KBObject> modifiedAfterObjs = new List<KBObject>();
foreach (EntityKey objKey in modifiedAfterKeys)

I hope these tips will help you start with the implementation of the query you need to resolve.

answered by 03.10.2016 / 23:37