1

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">
    <types>
        <members>WorkOrderPriority</members>
        <name>StandardValueSet</name>
    </types>
<version>44.0</version>
</Package>

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?

0

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/standardvalueset_names.htm

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

https://help.salesforce.com/articleView?id=wo_line_item_fields.htm&type=5

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 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.