Loading

Troubleshooting 'WorkTypeId' in type 'WorkOrder is undefined' Error and Missing Work Steps in Field Service Mobile App for Contractor Users

Data pubblicazione: May 11, 2026
Operazione

In Salesforce Field Service, contractor users operate with a community user license. When a contractor user opens a dispatched service appointment in the Field Service mobile app and attempts to complete the service report, the following error occurs:
'WorkTypeId' in type 'WorkOrder is undefined'
Additionally, work steps that are associated with the work type of the work order do not appear in the mobile app for the contractor user. The issue persists even when:

  • A service resource has been created and linked to the contractor user
  • A service appointment has been allocated and dispatched
  • The work type is a valid, standard work type used by other users without issues

The root cause is a missing object-level permission on the Work Type object for the contractor/community user's profile or permission set. When the Field Service mobile app's internal flow (or any auto-launched flow used during service report generation) includes a Get Work Order flow element that queries the Work Type object (via the WorkTypeId field), the system throws an undefined field error if the user does not have at least Read access to the Work Type object. This also prevents work steps — which are linked to the work type — from loading for that user.
Secondary cause: Other fields referenced within the Get Work Order element of the flow may also be inaccessible to the contractor user, compounding the errors.

Fasi

To resolve the 'WorkTypeId' undefined error and missing work steps for contractor users in the Field Service mobile app, follow these steps:
Step 1: Grant Read Access to the Work Type Object

  1. Go to Setup in your Salesforce org.
  2. In the Quick Find box, enter Profiles or Permission Sets, depending on how your contractor users are managed.
  3. Open the profile or permission set assigned to your contractor (community) users.
  4. Under Object Settings, locate the Work Type object.
  5. Enable at least Read access for the Work Type object.
  6. Save your changes.

Step 2: Verify Field-Level Security on Work Order Fields Used in Flows

  1. Navigate to Setup > Object Manager > Work Order > Fields & Relationships.
  2. Identify any custom fields that are referenced in the auto-launched flow used during service report generation (check the Get Work Order element in the flow).
  3. For each referenced field, click Set Field-Level Security and ensure the contractor user's profile has Visible access.
  4. Save your changes.

Step 3: Review the Flow Configuration

  1. Navigate to Setup > Flows.
  2. Open the flow used by the Field Service mobile app for service report generation (typically triggered when a mobile user completes a service appointment).
  3. Locate the Get Work Order element and review all fields being queried.
  4. Ensure that every field listed in that element is accessible to the contractor user's profile or permission set.
  5. If any fields are not required for contractor users, consider removing them from the flow element or using a separate flow version tailored for contractor users.

Step 4: Test the Configuration

  1. Log in to the Field Service mobile app as the contractor user.
  2. Open the relevant dispatched service appointment.
  3. Verify that work steps now appear correctly.
  4. Attempt to complete the service report and confirm that the error no longer occurs.
Numero articolo Knowledge

005317695

 
Caricamento
Salesforce Help | Article