Generate metadata source files for a new platform event.
Description for schema generate platformevent
This command is interactive and must be run in a Salesforce DX project directory. You're required to specify the event's label with the "--label" flag. The command uses this label to provide intelligent suggestions for other event properties, such as its API name.
Aliases for schema generate platformevent
generate:metadata:platformevent
Flags
| Flag Name (Long) | Flag Name (Short) | Description |
|---|---|---|
| <code>‑‑flags‑dir</code> | N/A | Type: Value<br><br>Import flag values from a directory. |
| <code>‑‑label</code> | <code>‑l</code> | Type: Value<br>Required<br><br>The platform event's label. |
Examples for schema generate platformevent
Create a platform event with the specified label:
sf schema generate platformevent --label "My Platform Event"
<!-- prettier-ignore-end -->