Enable Auto Select Cost Codes for EM Work Order when Equipment is shown in Portal

If you are showing Equipment and Cost Code on Mechanic Work Order lines, the following will allow the Cost Code field to populate automatically after WO item selection in the portal.

You will need access to User Database and PR Timecard entry in Vista, and be a System Admin in the portal to complete this configuration.
  1. Open the UD User Defined Lookups form in Vista and copy the existing EMCC lookup. Modify the new lookup as shown below:
    • From
      • EMCC with (nolock)
    • Where
      • EMWI.EMCo = ? and 1 = CASE WHEN ISNULL(?,'-1') = '-1' THEN 1 WHEN EMWI.WorkOrder = ? and EMWI.WOItem = ? THEN 1 ELSE 0 END
    • Join Clause
      • LEFT OUTER JOIN EMWI on EMCC.EMGroup = EMWI.EMGroup and EMCC.CostCode = EMWI.CostCode
    • Group by Clause
      • EMCC.CostCode, EMCC.Description


  2. On the Details tab, add the following:
    • Sequence 0, ColumnName 'EMEM.CostCode', ColumnHeading 'Cost Code'
    • Sequence 1, ColumnName 'EMEM.Description', ColumnHeading 'Description'
  3. Configure the lookup in Vista by following the steps below:
    • Open PR Timecard Entry and click the Field properties on Cost Code.
    • Click the Lookups tab in the field properties window and add the custom lookup created above.
    • Enter in the parameters as shown in the sample below (31, 31, 32).
    • Change the load Sequence to 0 and ensure that is the only 0.
  4. In the portal, go to Employee Tools > Grid Timecard Settings (Timecard Settings for the Standard Timecard). Select the appropriate Company and PR Group. Select the Advanced button on the Cost Code line, then select Auto Select 1st.
  5. Select Admin > Portal Settings and select Refresh Synonyms.