Sage 50¶
These functions are specific to Sage 50.
The functions fail if IMan does not have the Sage 50 licence feature, or if the Sage 50 libraries are not installed on the IMan server.
Sage50Lookup¶
Description
Looks up a value in the Sage 50 database through the Sage 50 data objects.
Syntax
Arguments
- systemid
- The system id of the company to query.
- dataobject
- The name of the record or object type in Sage 50, as defined in the Sage 50 Data Model. This is not the underlying ODBC table name.
- queryfield
- The field to query on.
- queryvalue
- The value of queryfield. Together, queryfield and queryvalue form the filter
<queryfield>=<queryvalue>.
- The value of queryfield. Together, queryfield and queryvalue form the filter
- returnfld
- The field to return.
- mustreturn
- When True, the function must return a value, and raises an error if it finds none. When False, the function returns an empty value when there is no matching record.
Example
Return the account reference of the customer with a given email address. SalesRecord is the Sage 50 object that holds customer accounts, and DemoData is the system connector for the company.
Sage50Lookup("DemoData", "SalesRecord", "E_MAIL", "[email protected]", "ACCOUNT_REF", True)