Loading

Salesforce Maps Custom Action Error: "The name can only contain underscores and alphanumeric characters"

Udgivelsesdato: Aug 18, 2026
Beskrivelse

When launching a custom action from a marker in Salesforce Maps, a button that had previously been working may generate the error "The name can only contain underscores and alphanumeric characters." This happens when the custom action setting contains [Custom] and the underlying managed package components have been altered.

Løsning

Cause

This error occurs when a custom action in Salesforce Maps was built by altering the Salesforce Maps managed package components rather than using a supported configuration method. This approach was introduced through custom development on legacy products and is not supported by Salesforce Maps.

Resolution

We recommend reviewing the out-of-the-box actions, such as Launching a Lightning Component or Launching a Visual Flow, to achieve similar behavior in a supported way. For more information on what is and isn't covered under developer support, see the Developer Support article in Additional Resources below.

Salesforce Support cannot make changes to your code. If you'd like to update your existing custom code to keep it working, the sample below shows the type of change needed to replace the deprecated event listener.

Code Sample

The original code uses a legacy Salesforce Maps event listener that is no longer supported. Updating the code to use the standard browser `load` event listener instead resolves the error.

Original Code:

MAActionFramework.on('ready', function () {

Updated Code:

window.addEventListener('load', function () {

Frequently Asked Questions

Can Salesforce Support update my custom action code for me?

No. Salesforce Support cannot make changes to your custom code. Statements of work related to MapAnything services do not apply here unless Salesforce Maps or Salesforce Services are explicitly named as responsible.

Why did my custom action stop working without any changes on my end?

Custom actions built by altering Salesforce Maps managed package components rely on unsupported methods that can break when the underlying package or platform components are updated.

Vidensartikelnummer

000394544

 
Indlæser
Salesforce Help | Article