Get account balance?

I'm trying to obtain a balance for an account via the SDK and am unable to figure out how to do this. Can anyone shed any light on it? It appears that the SDK is very limited, and poorly documented.

  • bsp01 said:

    I'm trying to obtain a balance for an account via the SDK and am unable to figure out how to do this. Can anyone shed any light on it? It appears that the SDK is very limited, and poorly documented.

    The balance of a G/L account,

     - at some point in time,

     - as of a fiscal year end, or

     - as of the very last transaction?

    Or did you mean the balance of a Vendor or Customer account?

    Most of the SDK methods look to be for the purpose of loading data into Sage 50.   There is support for accessing the 'raw' data to get values, or to run SQL queries.  This may have to be done by accessing the values stored in the database tables, or calculating from a fixed point, plus a series of transactions.

    I hope that helps, please post back.

    Randy

  • I suppose I'm looking for the balance of the account as of the last transaction, as well as balance between a specific date and time.

    I'm thinking I'd have to query the GL and do the calculation myself?

  • I thought I'd posted details on how to get the account balance using a SQL query of the balances stored in tAccount.  Seems to be gone, or didn't post.

    The best way to get accurate information is to export the data from the Sage 50 application.  

    At what point, for what purpose, and how often, will your application need the G/L account balances?

  • Balances are in tAccount.

    Transaction amounts in the current fiscal year can be calculated with a join between tJourent and tJentAcct.

    Previous fiscal year data is in tJentLY and tJentLYA, prior to that the naming is tJEhXX and tJEAhXX, and the balances are in another table that I can look up for you if you're interested.

    The account relationships can be worked out DataDict.pdf and DataRel.pdf.  The ID in tJourent is the Journal Entry number in the software.