0

So i retrieved custom metadata type and just custom object from my org via Ant Migration tool. After i createad a sfdx project. created scratch org and used push. It gives me error: 'Must specify a non-empty label for the CustomObject'. But there are label, plural label etc. What do i need to do?

Metadata:

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">  
    <label> Order</label>
    <pluralLabel>Orders</pluralLabel>
    <visibility>Public</visibility>
</CustomObject>

Ending is object-meta.xml

8
  • seems to be a known issue. Any reason for using the Ant Migration Tool to retrieve? Commented Aug 31, 2021 at 15:26
  • @KrisGoncalves what can i use? I tried illuminated cloud but same error.
    – Femladamli
    Commented Aug 31, 2021 at 15:28
  • 2
    Could it be the space between <label> and Order?
    – Moonpie
    Commented Aug 31, 2021 at 15:32
  • 1
    Don't use the mdapi if you can help it. sfdx force:source:retrieve would be ideal.
    – sfdcfox
    Commented Aug 31, 2021 at 15:34
  • @Moonpie checked, but its was accidently added when copied here, sorry)
    – Femladamli
    Commented Aug 31, 2021 at 15:41

2 Answers 2

0

Renamed file to object and back to object-meta.xml and it works. Dont know why cause it was 100% saved before.

0

I have also faced this error when I was trying to use something like :

<nameField>
    <label>Progress Report  Name</label>
    <type>Text</type>
</nameField>
<pluralLabel>Progress Reports</pluralLabel>
<searchLayouts/>
<sharingModel>ReadWrite</sharingModel>
<visibility>Public</visibility>

and after checking the error and some workaround found that is suppose to look like some :

 **<label>Progress Report</label>** - Need to include this line to solve this error
 <nameField>
        <label>Progress Report  Name</label>
        <type>Text</type>
    </nameField>
    <pluralLabel>Progress Reports</pluralLabel>
    <searchLayouts/>
    <sharingModel>ReadWrite</sharingModel>
    <visibility>Public</visibility>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .