1

I have a apex class "MyFile.page" that I cannot deploy. I had no issues deploying it to my sandbox using Illuminated Cloud. I have added the VF page to the package.xml file along with all the other metadata components. When I execute a deployment the error says "Required Field is Missing: Label"

I am aware that the issue is usually due to a -meta.xml file missing, but that is not the case with this file. Since executing the deployment using the package.xml. I attempted to use th CLI to deploy it manually but that failed as well.

What can be done to correct this error and ensure this file can be deployed.

I have yet to try a change set as that is what we are trying to move away from.

0

1 Answer 1

2

The meta.xml file is missing the label element, which is a required field for many types of components, including ApexPage.

From the ApexPage docs:

<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <description>This is a sample Visualforce page.</description>
    <label>SampleApexPage</label>
</ApexPage>

It's important to verify that meta XML files are in order when committing and deploying. It's pretty easy to accidentally modify one of these files without thinking about it.

2
  • @isherwood I edited to be more clear; it was contextual to this question, namely that ApexPage requires a label. I edited this answer to be clearer. You can check the documentation for what a label attribute looks like, and for an error like this, it's always best to check the documentation.
    – sfdcfox
    Aug 8, 2022 at 15:47
  • Your edit didn't make it more clear. However, your comment did. I put that good information in the answer. It's standard practice on SE sites to include the critical information from the external resource in the answer.
    – isherwood
    Aug 8, 2022 at 16:11

You must log in to answer this question.

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