GL Account Override Lookup Example

If you allow users to code to expense in the AP Invoice, Expense, and PO modules, you may want to restrict the list of available GL Accounts by creating a GL Lookup.

To do this, create a lookup based on a UD field in Vista, and then apply it to the proper portal setting.
Note: If you are processing expenses via Payroll, users will not see GL accounts when selecting the Expense line type. This will be determined by the Earn Code that the Expense Admin selects during processing.
  1. Create a user-defined field on the GL Chart of Accounts that shows only GL Accounts that have with a UD field. The following example shows how to link the employee PRCo directly to the GLCo.

  2. Add the following lookup in Admin > Manage Lookups.


    Lookup Detail:

    Select cast(KeyID as varchar(10)) as ChoiceShortName, GLAcct + ' - ' + Description as ChoiceLongName

    from kGLAC

    INNER JOIN GetEmplInfo(null,null,@AuthToken) a on kGLAC.GLCo = a.PRCo

    WHERE kGLAC.udExpenseYN = 'Y'

    Note: To remove the GLCo link to the PRCo of the current user, remove "INNER JOIN GetEmplInfo(null,null,@AuthToken) a on kGLAC.GLCo = a.PRCo" from the SQL Choice Override.
  3. If you allow users to enter expenses for other users, you can create a more dynamic lookup that sends the PRCo and Employee of the proxied user, as shown in the following example:


    Lookup Detail:

    Select cast(kGLAC.KeyID as varchar(10)) as ChoiceShortName, GLAcct + ' - ' + kGLAC.Description + '- Employee ' + cast(kPREH.Employee as varchar(200)) as ChoiceLongName

    from kGLAC

    INNER JOIN kPRDP on kGLAC.GLCo = kPRDP.PRCo and kGLAC.udPRDept = kPRDP.PRDept

    INNER JOIN kPREH on kPRDP.PRCo = kPREH.PRCo and kPRDP.PRDept = kPREH.PRDept

    WHERE kPREH.PRCo = @PRCo and kPREH.Employee = @Employee

  4. Assign the lookup to the portal setting GL Account Override Lookup located under Admin > Portal Settings > Expense > General Configuration.
  5. Review your GL Chart of Accounts in Vista and mark all appropriate accounts. See the following example:


  6. Apply your lookup to the appropriate portal setting:
    • For AP: Invoice Line GL Account Override Lookup under Admin > Portal Settings > AP Review > Invoice Line Item.
    • For Expense: GL Account Override Lookup under Admin > Portal Settings > Expense > General Configuration.
    • For PO Pending: GL Account Override Lookup for PO under Admin > Portal Settings > Purchase Orders > PO Pending.