Tags: 
API, Dynamics GP

Overview

These public interfaces are used in Dynamics GP components. They are provided for implementing advanced functionality in your scripts. In order for you to use these interfaces in your project, you have to reference CozyRoc.SSISPlus.dll and CozyRoc.Dynamics.dll libraries. Also include CozyRoc.Dynamics.Gp and CozyRoc.Dynamics.Gp.Service namespaces.


IConnection / IGpConnection

When you call Dynamics GP Connection Manager AcquireConnection method, it returns object implementing IConnection interface. This is the interface used for interaction with Dynamics GP service.

Methods

Connects to Dynamics GP service.

Closes the connection to Dynamics GP service. Use always after you finish working with the service.

Returns true if connected to the service.

Get Dynamics GP web service object.

Get Dynamics GP context object.

Returns list of available companies.

Gets objects list for specific operation. These are the method parameters:

  • operation (uint) - It can be one of the options listed in the following table.
    Value Description
    0 Return objects, which can be completely read.
    1 Return objects, which support summary read.
    2 Return objects, which support record creation.
    3 Return objects, which can be updated.
    4 Return objects, which permit record removal.
    5 Return objects, which permit record void.

Gets specified object composite objects list. These are the method parameters:

  • root (string) - object name.

Get object used to manipulate Dynamics GP object. The method returns IObject object. These are the method parameters:

  • name (string) - object name.

Properties

Specify the name or IP address of the Dynamics GP server.

Specify user name to access the Dynamics GP service.

Specify user password to access the Dynamics GP service.

Specify company name.

Specify the number of seconds before timing out session connect. The default value of this property is 100 seconds.

Specify if you want to use the security settings for a different user, other than the user setup in your credentials. The default value is empty.

Specify culture in use. It should be in the format en-US. Based on the selected culture, the service will return data in format specific to it.

Specify how currency information is handled. This property has the options listed in the following table.

Value Description
0 The transaction currency amount will be used (default).
1 The local currency amount will be used.

Specify role used for policy and behavior options. If not specified, the default role will be used.

Specify if all clients should use the same connection. This property has the options listed in the following table.

Value Description
True All clients use same connection (default).
False Every client uses different connection.

Specify the name or IP address of the proxy server.

Specify the port number on the proxy server to use for the connection.

Specify user name to access the proxy server.

Specify password to access the proxy server.


IProperty / IGpProperty

This interface is used to retrieve Dynamics GP object property information.

Properties

Returns property name.

Returns true if property is object key.

Returns property type.

Returns property length.

Returns property precision.

Returns property scale.


IObject / IGpObject

This interface is used for Dynamics GP object management.

Methods

Get object properties. The method returns array of IProperty objects. These are the method parameters:

  • summary (bool) - if true, the summary object properties are returned. Otherwise it will return the complete object properties.

Constructs Dynamics GP object instance. These are the method parameters:

  • summary (bool) - if true, summary object is returned. Otherwise it will return the complete object.

Sets property value in Dynamics GP object. These are the method parameters:

  • instance (object) - Dynamics GP object instance.
  • property (string) - property name.
  • value (object) - property value.

Returns property value from Dynamics GP object. These are the method parameters:

  • instance (object) - Dynamics GP object instance.
  • property (string) - property name.

Retrieves Dynamics GP object. These are the method parameters:

  • id (object) - object identifier.

Retrieves objects from Dynamics GP service. These are the method parameters:

  • criteriaXML (string) - XML string of Dynamics GP restriction.
  • summary (bool) - if true, summary objects are returned. Otherwise it will return the complete objects.

Retrieves records of composite object. These are the method parameters:

  • instance (object) - instance to main Dynamics GP object.
  • key (string) - parent object key. Multiple keys are separated with semicolon (;).

Creates record in object. These are the method parameters:

  • instance (object) - Dynamics GP object instance with create data.

Updates existing record in object. These are the method parameters:

  • instance (object) - Dynamics GP object instance with update data.

Updates records in composite object. These are the method parameters:

  • instance (object) - instance to main Dynamics GP object.
  • key (string) - parent object key. Multiple keys are separated with semicolon (;).
  • list (object array) - array of composite Dynamics GP objects.

Deletes record in object. These are the method parameters:

  • id (object) - identifier of record to delete.

Voids record in object. These are the method parameters:

  • id (object) - identifier of record to void.

Properties

Returns the object name.

Returns true if composite object.


Related documentation