1

I'm trying to delete a single Custom Button (AKA a WebLink).

Is there a way that single button can be deleted via the CLI?

Weblinks are grouped with CustomObjects in project files, so if I delete the whole object, all it's weblinks get deleted to. But I was hoping there was a way to delete a single WebLink on it's own.

Or am I going to have to resort to doing it manually?

1
  • 1
    sf project delete source --metadata "WebLink:<Object>.<Button>" - haven't tried this, caveat emptor. Commented Nov 13 at 20:47

1 Answer 1

1

As described by @identigral:

sf project delete source -m Weblink:My_Custom_Object__c.My_Button 

This command will delete the Weblink metadata component from the CLI, however, be aware that the WebLink would need to be dereferenced from other components within the org.

E.g. Command failed with This WebLink is referenced elsewhere in salesforce.com - My_Custom_Object__c-My Custom Object Layout.

Relevant sf cli docs: project delete source

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.