Share via


Dynamics GP service use for Import GL Transactions

The sample application uses several Dynamics GP service objects and methods. The DataManager class loads a proxy class named wsDynamicsGP that allows service objects and methods to be used. The application loads the wsDynamicsGP proxy class using information provided by the service.

Methods

The DataManager class constructor loads the services proxy and creates a context object.

The XML for each transaction specifies the company ID for the transaction. DataManager resets the context object OrganizationKey property during each transaction to ensure the transaction is applied to the specified company.

The CreateGLTransaction method creates the transaction in Microsoft Dynamics GP. The method uses a GL transaction object to represent the details of the transaction. The GLTransaction object requires a GLTransactionKey object to identify the new transaction.

The GL transaction object uses a collection of GLTransactionLine objects to specify the accounts for the transaction. GLTransactionLines require GLTransactionLineKey, GLAccountNumberKey, and MoneyAmount objects to specify the debit and credit accounts and the amounts for a transaction.