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.
- Open the UD User Defined Lookups form in Vista and
copy the existing EMCC lookup. Modify the new lookup as shown below:
- EMCC with (nolock)
- 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
- On the Details tab, add the following:
- Sequence 0, ColumnName 'EMEM.CostCode', ColumnHeading 'Cost Code'
- Sequence 1, ColumnName 'EMEM.Description', ColumnHeading 'Description'
- 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.
- In the portal, go to Advanced button on the Cost Code line, then select Auto Select 1st. (Timecard Settings for the Standard Timecard). Select the appropriate Company and PR Group. Select the
- Select Refresh Synonyms. and select