Intacct Lookups

The Intacct connector also allows you to lookup values from your organisation. The Intacctlookup function is very similar to the native Lookup function in IMan.

Syntax

Intacctlookup(systemid, entity, where, mustreturnvalue)

Arguments

  • systemid
    • The system id value of the system connector to be used for the lookup.
  • entity
    • The name of the entity to return the field from.
    • If the entity supports different transactions (such as Sales Order or Purchase Order) it is necessary to enclose the transaction name in square brackets after the entity.
    • For example - SODOCUMENT[Sales Order-Inventory]
  • select
    • The name of the field to be returned.
  • where
    • The where clause of the query, see the Filter Record section for syntax.
  • mustreturnvalue
    • True or False to specify the Lookup query should return one record.
    • True
      • An error will be raised if the lookup fails to return a record.
    • False
      • The function will return an empty string if the lookup fails to return a record.

Example #1

To return the CustomerId from the Customer entities using the primary contact email address as criteria.

IntacctLookup("Intacct", "CUSTOMERID", "CUSTOMER", "DISPLAYCONTACT.EMAIL1 = " & %customer_email, True)

The dotted notation in the where queries allows you to navigate object relationships. In this example the Email1 field is a member of the DisplayInfo contact.

Example #2

To return the Customer ID from a Sales Order - Inventory transaction by the PONUMBER.

IntacctLookup("INTACCT", "CUSTVENDID", "SODOCUMENT[Sales Order-Inventory]", "PONUMBER = " & %orderNumber, True)