For the managed package runtime, customize an LWC Edit Block's new entry card by extending the Edit Block New LWC. Exclusive to the Card edit mode, the Edit Block New LWC overrides the new entry card.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Before You Begin
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 New LWC
example. The code in the custom LWC example changes the text color to green.
Original Edit Block New Card
Custom Edit Block New Example


-
In the LWC's JavaScript file, extend the Edit Block New LWC. Using this code
example, replace the NS with the namespace of the package.
Example:
import omniscriptEditBlockNew from "NS/omniscriptEditBlockNew"; import template from "./editblockNewCustomize.html" export default class editblockNewCustomize extends omniscriptEditBlockNew{ // 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, click Edit Block Mode and select Cards.
- In the Edit Block’s Edit Block New LWC Component Override field, enter the name of the custom LWC.
- Activate the Omniscript and preview your changes.