has anyone encountered and solved a sfdx force:mdapi:deploy error about changing a field from released to non-released? I'm getting this error when deploying to the packaging org.

We've been working with DX in our managed package for like 7 months now, and now suddenly we've received the following error when trying to upload to the packaging org:

Error mdapi_output_dir/objects/Donation_App_Setting__mdt.object Donation_App_Setting__mdt.Technical_User__c Cannot modify managed object: entity=CustomFieldDefinition, component=00NC0000006OYPn, field=IsCaseSensitive, state=released: newValue='false', oldValue='true'

We haven't changed anything in this metadata field since we started working with dx, so I'm lost on what could've happened here and how can I fix it.

I'm 100% sure we haven't changed anything to this field, here is the entire history of the field, which is just the initial commit

Technical_User__c commit history

  • How do you go from SFDX source to MDAPI-ready metadatas ? Can you share the content of the related metadata field XML ? You can not "un-release" an already released field, but if you didn't make any change to provoke that, I agree that is really strange ... ( and makes me afraid for our own managed package ^^ ) – Nicolas Vuillamy Feb 5 at 16:16
  • Hi @NicolasVuillamy, I always convert it sfdx force:source:convert --outputdir mdapi_output_dir --packagename Namespace and deploy it sfdx force:mdapi:deploy --deploydir mdapi_output_dir -u mydevorg (haven't get around to test the new force:source:deploy command) – Jose Feb 5 at 17:16
  • We don't use --packagename on our project (convert then filter results using sfdx-essentials plugin) , but in your case maybe it connects to the packaging org to fetch the content of the package... if you go in the package definition in the org, do you see your field Techniczl_User__c selected ? – Nicolas Vuillamy Feb 5 at 17:55
  • Hi @NicolasVuillamy, the field is in the package definition since version 3.48 (we are on 5.31) and when I convert the source to metadata format in the package.xml that gets generated the field is also listed under <types><name>CustomField</name<members>Donation_App_Setting__mdt.Technical_User__c</members></types> – Jose Feb 5 at 18:42
  • I have the exact same issue using the ant migration tool. It's picked 2 random fields from around 50 custom objects, the rest apparently ok. I have tried re-uploading a set of source which uploaded fine about a week ago, same issue. – FatalFlaw Feb 5 at 18:53

Your Answer

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

Browse other questions tagged or ask your own question.