The SourceFields object is used in scripts attached to fields in the Integration Mapping window. It refers to any field in the queries that are part of the integration.
Syntax
SourceFields(name)
Parameters
name—A string
containing the name of the source field. The full name includes the
name of the query the field is part of, followed by a period. If
the source field is part of the root query for the integration, you
do not need to include the query name.
Example
The following example is
the Before Document Commit script for a vendor integration. It
retrieves a value of the VendorID field from a query used by the
integration and stores it in a variable to be used later in the
integration.
SetVariable “Document ID”, CStr(SourceFields(“VendorID”))
The following example is the Before Document Commit script for a General Ledger integration. It retrieves a value of the Doc Num field from the GL Header query used by the integration and stores it in a variable to be used later in the integration.
SetVariable “DocNum”, CStr(SourceFields(“GL Header.Doc Num”))