Skip to main content

Resolving validation errors - "In field: excludeButtons, no such standard action:GenerateKnowledge"

Cause and solution to this Salesforce validation error surfaced on Layout metadata

Written by Ryan Quinn

Note: Gearset has a problem analyzer that automatically removes this reference from your deployment package. Most deployments that hit this error don’t need a manual XML edit.
​

This problem analyzer is enabled by default. It runs even when the exclusion is unchanged and already present in both source and target. Check or turn it off from your team’s Problem analyzer templates. If it’s switched off, or you’d rather make the change yourself, follow the manual workaround below.

Error overview

This validation error appears when a Layout or CustomObject metadata component contains an <excludeButtons> tag that references the standard action GenerateKnowledge.
​

The error is likely to happen even when the affected layout or custom object shows no difference between your source and target environments.
​

An example of the error message:

"In field: excludeButtons, no such standard action:GenerateKnowledge"


Explanation of the error

We suspect that Salesforce’s Metadata API doesn’t currently support deploying GenerateKnowledge. This may be the direct root cause of the error.
​

GenerateKnowledge appears to be a standard action that Salesforce is rolling out unevenly across orgs. So the action can be present in some orgs but not others. Validation can fail even when the affected layout compares as No difference between source and target.
​

Resolution

Gearset can fix this for you automatically with the Exclude generate knowledge problem analyzer. If you’d rather make the change yourself, remove the reference to GenerateKnowledge from the XML in the source environment of your deployment. For example, remove it from the feature branch if you’re deploying with Gearset Pipelines.
​

Automatic fix with the Exclude generate knowledge problem analyzer

Run your comparison and select the affected layout or custom object. At the problem analysis step, Gearset raises the problem Components referencing the GenerateKnowledge button and selects the fix by default. The fix removes the <excludeButtons>GenerateKnowledge</excludeButtons> line from the deployment package, on both the source and target side.


The problem analyzer runs automatically wherever it’s enabled, whether you’re validating a PR in Pipelines or running a manual Compare and deploy. It’s enabled by default. Check or change this from your team’s Problem analyzer templates.


Once it’s enabled, you don’t need to do anything else. Gearset removes the reference the next time you run the comparison.

If you need to make this change manually (for example, if the problem analyzer is turned off for your template), follow the steps below.
​

Manual workaround

Follow these steps to remove the reference:

  1. Find the affected layout or custom object in the validation error.

  2. Open its XML and find this line: <excludeButtons>GenerateKnowledge</excludeButtons>

  3. Remove the line from the XML in your source environment:

    • If you’re deploying from git, including with Gearset Pipelines, remove it in your feature branch.

    • If you’re deploying org to org, download and edit the deployment package. Follow the article on how to change the deployment package.

  4. Deploy the updated metadata to the org with Gearset. For an edited package, use Compare and deploy with the edited package as your source and the org you want to update as your target.

Once this deployment finishes, the error shouldn’t appear again.
​

Similar errors for other deprecated or not yet supported standard actions

Similar errors can occur for other standard actions that Salesforce has deprecated or doesn’t yet support deploying with the Metadata API. Gearset also has dedicated problem analyzers for the following actions, and they work the same way as the one described above:

If you hit a similar “no such standard action” error that references a different button, check your Problem analyzer templates for a matching problem analyzer before you edit the XML by hand. The same cause and fix generally apply.

Disclaimer: This error is returned by Salesforce directly, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.

Did this answer your question?