Skip to main content

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

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

Written by Cecilia Califano

Note: Gearset has a problem analyzer called "Exclude schedule appointment" that automatically removes this reference from your deployment package, so most deployments hitting this error don't need any manual XML edit.

This problem analyzer is enabled by default, and it fires even when the exclusion is unchanged and already present in both source and target. You can 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, the manual workaround below is still available.

Error overview

You may run into this validation error when a Layout metadata component contains an <excludeButtons> tag referencing the standard action ScheduleAppointment.

It's likely that the error will happen even when the affected Layout shows no difference between your source and target environments.

An example of the error message:


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

Explanation of the error

Gearset's Support Engineering team suspects that Salesforce's Metadata API doesn't currently support deploying ScheduleAppointment, which may be a direct root cause of the error.

Why?

ScheduleAppointment appears to be a standard action that support for is rolling out unevenly across Salesforce orgs. Because of this inconsistency, the action can be present in some orgs but not others, and validation can fail even when the affected Layout compares as "No Difference" between source and target.

Resolution

Gearset can do this for you automatically, using the Exclude schedule appointment problem analyzer. If you'd rather make the change yourself, or need to for another reason, you can also remove the reference to ScheduleAppointment from the Layout's XML in the source environment of your deployment (e.g. from the feature branch if you're deploying via Gearset Pipeline).

Automatic fix with the Exclude schedule appointment problem analyzer

Gearset's Exclude schedule appointment problem analyzer identifies the <excludeButtons>ScheduleAppointment</excludeButtons> line in your Layout metadata and removes it from the deployment package, on both the source and target side, before your comparison runs.

This runs automatically wherever the problem analyzer is enabled, whether you're validating a PR in Pipelines or running a manual Compare and deploy. It's enabled by default; you can check or change this from your team's Problem analyzer templates.

Once it's enabled, you shouldn't need to do anything else. Gearset removes the reference for you 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. Identify the affected Layout from the validation error.

  2. Open the Layout's XML and locate the line: <excludeButtons>ScheduleAppointment</excludeButtons>

  3. Remove that line of code from the XML in your source environment (e.g. your feature branch, if you're deploying via Gearset Pipeline).

  4. Deploy the updated metadata back to the org using Gearset. The simplest way to do this is to follow the article on how to change the deployment package, then use Compare and deploy with your source being the edited package and the target being the org you want to update.

After this deployment is completed, the error should no longer surface.

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 via the Metadata API. Gearset also has dedicated problem analyzers for SmartFillEnrich (see our related article) and CreateSalesSummaries (see our related article), which work the same way as the one described above.

If you hit a similar "no such standard action" error referencing a different button, check your Problem analyzer templates for a matching problem analyzer before editing the XML by hand. The same underlying cause and resolution 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?