2

I need some assistance with the following problem. I added the following code to my LWC:

    <?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>48.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__AppPage,lightning__RecordPage">
            <property name="options" type="String" label="Options" datasource="val1, val2" />
        </targetConfig>
      </targetConfigs>
</LightningComponentBundle>

I removed the component from the lightning page that I added it to, saved the page, removed the corresponding 'options' property from the JS, saved, and then updated the code above to remove the "options" property, at which point I received this error message when I tried to deploy:

You can't remove the property tag named 'options' specified in targetConfig lightning__RecordPage. The component is in use on a Lightning page.

You can't remove the property tag named 'options' specified in targetConfig lightning__AppPage. The component is in use on a Lightning page.

I'm not sure why I am receiving this error even though I have removed the component from the lightning page. Is anyone able to help? Thank you.

1
  • i need help in this, help anyone. Commented Jul 15, 2020 at 5:02

1 Answer 1

-3

Yes, this is a Very trick thing.

For this, you Have to remove the "LWC" component from your record page or app Page where your component is used. and after that try to deploy your updated code.

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>48.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__AppPage,lightning__RecordPage">          
        </targetConfig>
      </targetConfigs>
</LightningComponentBundle>
1
  • Got a new error : The 'targetConfig' tag doesn't contain any design information.
    – kabrice
    Commented Jun 1, 2021 at 9:14

You must log in to answer this question.

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