Creating a Transaction Requester document type

The Transaction Requester allows you to create custom Transaction Requester document types. You can use the Transaction Requester to define new document types that support your specific business needs. For example, you can create a document type to retrieve data from tables that the original Transaction Requester document types do not include.

To create a custom Transaction Requester Service, you first identify the tables and other information that the Transaction Requester requires. You need to identify a document type name, the tables to use, the index columns, the key fields used to join tables, and the data fields you want to include in your document.

You must recreate all custom requester services after an installation has completed. The install drops and recreates the eConnect_Out_Setup table. Any custom information in the eConnect_Out_Setup table is lost.


To define your document type, you need to add the information you gathered to the eConnect_Out_Setup table. The Transaction Requester uses the information in this table to retrieve and publish eConnect XML documents.

The following table describes the columns of the eConnect_Out_Setup table.

[spacer]

Column name

Data type

Description

DOCTYPE

varchar

Identifies the service.

INSERT_ENABLED

int

Determines whether the service is enabled or disabled for an insert action. Enabled=1, Disabled=0

UPDATE_ENABLED

int

Determines whether the service is enabled or disabled for an update action. Enabled=1, Disabled=0

DELETE_ENABLED

int

Determines whether the service is enabled or disabled for a delete action. Enabled=1, Disabled=0

TABLENAME

varchar

Physical name of table in SQL Server.

ALIAS

varchar

Alias name for DOCTYPE, which is used in the output XML document. (Try to keep alias names as short as possible.)

MAIN

int

Determines whether this record is associated with the primary table or a child table. MAIN=1 defines a primary table; MAIN=2 or greater defines a secondary table. Increment by one for every level.

PARENTLEVEL

int

Determines the parent for this record. When you specify a table as a secondary table (the value of MAIN is greater than 1) you need to specify its parent level. Set the parent level to 1 if it directly links to the main table. If your secondary table links to a child table of the main table, use the value in the child table’s MAIN column as your table’s PARENTLEVEL value.

ORDERBY

int

Defines whether this level needs to be included in the order by clause. ORDERBY=1 defines this level to be included;

ORDERBY=0 defines this level to be ignored.

USERDEF1-5

varchar

Used for any user-defined purpose.

REQUIRED1

varchar

Defines the name of the column to verify whether data exists for it during an insert transaction. If the column specified is empty, this transaction is ignored. If the column has data in it and the service is enabled, the transaction is echoed to the shadow table (eConnect_Out). If no column is specified, all transactions are written out to the shadow table.

INDEX1-15

varchar

Specifies the column name of the primary index that should be used for this table. You can specify 1 to 15 columns.

INDEXCNT

int

Defines the number of columns that are specified for the index columns.

TRIGGER1-15

varchar

Specifies column names used for creating triggers. The columns specified should link back to the columns that you specified in the INDEX1-15 columns of the main table. These columns are used to determine what data needs to be written out to the shadow table (eConnect_Out).

JOINTABLE

varchar

Specifies the table name that needs to be used for joining.

JOIN1-10

varchar

Specifies column names from the table specified in the TABLENAME column that are used to join to the table specified in the JOINTABLE column.

JOINTO1-10

varchar

Specifies column names from the table specified in the JOINTABLE column that are used in conjunction with the columns listed in the JOIN1-10 columns.

DATACNT

int

Defines the number of columns that are specified for the data columns.

DATA1-180

varchar

Specifies names of the data columns that you want to appear in the XML document. You can specify 1 to 180 columns.


The Transaction Requester cannot support SQL Server data columns that are defined as either text or binary.


To add a document type to the Transaction Requester, use a SQL query to insert a new record to the eConnect_Out_Setup table of your Microsoft Dynamics GP company database. Use the query to populate the columns that uniquely define your document type. To ensure the Transaction Requester can use your document type, your SQL query must include the following required information: