I realize the command is still in beta, but I am unable to delete a custom field using the force:source:delete
command.
I have tried force:source:delete -m CustomField:myObject__c.myField__c
, which results in the error ERROR: Cannot read property 'split' of undefined
And I have tried force:source:delete -p .\objects\myObject__c\fields\myField__c.field-meta.xml
which returns a No results found
message.
Needless to say, in neither case does the field get deleted (note that I have deliberately omitted the -u
parameter in the above examples for simplicity).
Finally, as an aside, the -p
parameter I find problematic because if you have deleted the field in your scratch org the corresponding metadata file is also deleted, which means that there is no metadata file to point to when attempting to delete from a sandbox. I suspect the -m
parameter also implicitly assumes that a metadata file exists (which it does in case anyone is thinking I have removed it - in fact, the same error results regardless). What makes more sense (at least to me) is to have say a -x destructiveChanges.xml
type parameter.