Sage 50

The following functions are specific to use for Sage50.

The functions will fail without the Sage 50 license feature and/or the Sage50 libraries are not installed on the IMan server.

Sage50Lookup

Description

Performs a lookup against the Sage50 database via the Sage50 data objects.

Syntax

  • Sage50Lookup( systemid, dataobject, queryfield, queryvalue, returnfld, mustreturn )

Arguments

  • systemid
    • Of the company to be queried.
  • dataobject
    • The name of the record/object type in Sage50 as defined through the Sage50 Data Model (this is not the underlying ODBC Table name).
  • queryfield
    • The field used to perform a query on.
  • queryvalue
    • The value of the queryfield; logically the queryfield and queryvalue arguments form a filter in the form of <queryfield>=<queryvalue>.
  • returnfld
    • The field to return.
  • mustreturn
    • when set to true the function must return a value, if the function does not return a value an exception will be raised. When set to false, if the function will return an empty value when there is no matching record.

Examples

To query the Customers object for Customer Reference field using the Email Address for the Sage50 company specified in the DemoData system.

Sage50Lookup(“DemoData”, “SalesData”, “E_MAIL”, “[email protected]”, “ACCOUNT_REF” True)