For the managed package runtime, customize an LWC Edit Block's Label for the Cards and Long Cards edit modes by extending the Edit Block Label LWC. Exclusive to Cards and Long Cards edit mode, the Edit Block Label LWC overrides the original labels, including global actions.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Ensure you understand the requirements for extending an Omniscript element's Lightning web component.
- Create a custom LWC in VisualStudio or download a custom Edit Block LWC example. The code in the custom LWC example changes the label of a global action to green.
-
In the LWC's JavaScript file, extend the Edit Block Label LWC. Using this code
example, replace the NS with the namespace of the package.
Example:
import omniscriptEditBlockLabel from "NS/omniscriptEditBlockLabel"; import template from "./editblockLabelCustomize.html" export default class editblockLabelCustomize extends omniscriptEditBlockLabel{ // your properties and methods here render() { return template; } } - Add code to the custom LWC.
- Deploy the custom LWC to Salesforce.
- Go to the Omniscript that contains the Edit Block LWC.
- In the Edit Block's properties, select Edit Block Mode, and click Cards or LongCards.
- In the Edit Block's Edit Block Label LWC Component Override field, enter the name of the custom LWC.
- Activate the Omniscript and preview your changes.

