function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Maciej Simm 1Maciej Simm 1 

[SFDX] force:source:pull fails with StandardValueSet. Any workarounds?

Hi everyone,

We're using SFDX for our dev process, but recently - one of our developers added few field values in standard Order.Status field in his scratch org. This blocks sfdx force:source:pull entierly, following error appears:

> sfdx force:source:pull -u enxCommsMASIM_23
ERROR:  Unable to retrieve file for id 33 of type StandardValueSet due to an internal error:218292943-3106 (-173667445).


This is what i see in force:org:status
> sfdx force:source:status -u enxCommsMASIM_23
=== Source Status
STATE          FULL NAME                        TYPE              PROJECT PATH
─────────────
...
Remote Add     OrderStatus                      StandardValueSet


And now the environment is blocked, as I can't pull anything. Is there any workaround for this? 
We tried to eliminate standardValueSet in forceignore file, I don't see any way to reset remote.
Is it SFDX bug that standardValueSets are not supported?
Dino UrsicDino Ursic
Hi Maciej,

I know this won't be much of a help for you, considering the answer comes 6 months after your original question. But I thought it might be still worth the trouble, as your question is one of the rare instances of this particular problem throughout almost entire SFDC Dev community.

To cut to the chase, the workaround for the sfdx force:source:pull not being able to sync remote changes to local working directory when there are OrderStatus changes in the scratch org is to simply add the StandardValueSet to the forceignore (https://success.salesforce.com/answers?id=9063A000000igCFQAY) file, without the path, like so:
OrderStatus.standardValueSet

My previous unsuccessful attempts included both single file, as well as the entire folder, along with the full relative path:
force-app/main/default/standardValueSets
force-app/main/default/standardValueSets/OrderStatus.standardValueSet
force-app/main/default/standardValueSets/OrderStatus.standardValueSet-meta.xml

Hope it will save someone's time down the road.
 
gtuerk_greensaasgtuerk_greensaas
So this implies you cannot add the OrderStatus changes to an unlocked package created from one of these scratch orgs?  That doesn't seem to be an acceptable workaround
Jonathan Dawson 27Jonathan Dawson 27
@Dino Ursic, many many thanks. Saved me a tonne of work.

All the best, Jonathan