I'm struggling with retrieving standard picklist Priority from the WorkOrder object. I'm trying to determine if I'm doing something massively wrong, or if there is a bug in the metadata API. I have package.xml file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">

I'm then using the Salesforce CLI to retrieve this from my org running the command

sfdx -r . -k package.xml -u orgAlias

I've done this a million times before on other metadata without any issues. The result of the command is the expected unpackaged.zip file which correctly contains a folder standardValueSets however inside this folder is only a file called: WorkOrderLineItemPriority.standardValueSetwhich, as the savy reader will spot, is the wrong sObject. The content of the file is also what you expect to find in the WorkOrderLineItem object.

Does anyone have experience with this particular standard picklist and how to work with it?



The documentation notes what you did so I don't believe you're doing anything wrong.


The following lists Priority under "Work Order Line Item Fields" which supports what you're seeing as the result of the pull

enter image description here

enter image description here

I'm assuming what you're experiencing is expected, but I don't use Field Service so I can't confirm. It might be worth creating a case with Salesforce to understand those two objects as well.

  • The problem is, that you can modify the values on the Work Order priority field independently of the values on the Work Order Line Item priority. It is also worth adding that trying to deploy the retrieved metadata will fail with the erorr that the metadata WorkOrderPriority was mentioned in the package file but not found in the retrieved zip file. I think I've come to the conclusion that there is some kind of fishy bug going on here. The WorkOrderLineItemPriority field isn't even mentioned in the documentation, even though it is an independent field. I'll log a case with Salesforce Support – Seraph Nov 3 '19 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.