My Products
Help
tenacul
CONTRIBUTOR *

Syncing generalLedgerTransaction

by tenacul (Updated ‎09-11-2023 17:23 by tenacul )

Hi Business NXT team,

 

We are currently working on retrieving data from the "generalLedgerTransaction" endpoint. While it's functioning well for a full data load, we're facing challenges when trying to implement a synchronization option in our query. We were thinking of working with either the "changedDateTime" or "changedDate" fields.

In other systems, we typically see a primary key, often referred to as an "ID," that we can use to identify and delete previous data for records that have been updated. In Business NXT, we've encountered the "voucherJournalNo" and "voucherNo" fields, but these fields frequently contain multiple records with the same number. Initially, we considered deleting all records associated with a particular "voucherJournalNo." However, we've observed that the "changedDate" and "changedDateTime" values can vary for different records sharing the same "voucherJournalNo" or "voucherNo." Is there another reliable method to identify which records/lines we need to delete or something else that you can recommend us, so that we are able to keep an up to date table from the generalLedgerTransaction?

I hope our request is clear.

 

Thanks in advance for your time.

1 REPLY 1
Accepted solution
Marius Bancila
VISMA

by Marius Bancila (Updated ‎14-11-2023 10:29 by Marius Bancila VISMA )

The GeneralLedgerTransaction table does have a key; however, it's a multi column key made of the voucherJournalNo and auditNo columns.

In general, you can check the primary key columns for any table in GraphiQL (https://docs.business.visma.net/graphiql/😞

- open GraphiQL

- write a simple query like this:

- hover the cursor over the table (or any schema entity) that you want to explore:

 

MariusBancila_1-1699954157801.png

 

- click on the links (here, the connection) and explore it in the Schema Explorer (on the right)

MariusBancila_0-1699954084351.png

Primary keys are marked with [PK] and are always displayed first.