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.
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.
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.
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 () {
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.
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.
000394544

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.