diff --git a/CHANGELOG.md b/CHANGELOG.md index dd423a42..5e776efb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.1.21](https://github.com/salesforcecli/plugin-sobject/compare/1.1.20...1.1.21) (2024-03-24) + +### Bug Fixes + +- **deps:** bump @salesforce/core from 6.7.1 to 6.7.3 ([b378d81](https://github.com/salesforcecli/plugin-sobject/commit/b378d8173220d9cd975ad4f3a2ae965a673a195c)) + ## [1.1.20](https://github.com/salesforcecli/plugin-sobject/compare/1.1.19...1.1.20) (2024-03-17) ### Bug Fixes diff --git a/README.md b/README.md index a6bcba10..58a1b5fc 100644 --- a/README.md +++ b/README.md @@ -107,190 +107,8 @@ sf plugins -- [`sf schema generate field`](#sf-schema-generate-field) -- [`sf schema generate platformevent`](#sf-schema-generate-platformevent) -- [`sf schema generate sobject`](#sf-schema-generate-sobject) -- [`sf schema generate tab`](#sf-schema-generate-tab) +# Command Topics -## `sf schema generate field` - -Generate metadata source files for a new custom field on a specified object. - -``` -USAGE - $ sf schema generate field -l [-o ] - -FLAGS - -l, --label= (required) The field's label. - -o, --object= The directory that contains the object's source files. - -DESCRIPTION - Generate metadata source files for a new custom field on a specified object. - - This command is interactive and must be run in a Salesforce DX project directory. You're required to specify the - field's label with the "--label" flag. The command uses this label to provide intelligent suggestions for other field - properties, such as its API name. - - You can generate a custom field on either a standard object, such as Account, or a custom object. In both cases, the - source files for the object must already exist in your local project before you run this command. If you create a - relationship field, the source files for the parent object must also exist in your local directory. Use the command - "sf metadata retrieve -m CustomObject:" to retrieve source files for both standard and custom objects from - your org. To create a custom object, run the "sf generate metadata sobject" command or use the Object Manager UI in - your Salesforce org. - -ALIASES - $ sf generate metadata field - -EXAMPLES - Create a field with the specified label; the command prompts you for the object: - - $ sf schema generate field --label "My Field" - - Specify the local path to the object's folder: - - $ sf schema generate field --label "My Field" --object force-app/main/default/objects/MyObject__c - -FLAG DESCRIPTIONS - -o, --object= The directory that contains the object's source files. - - The object source files in your local project are grouped in a directoy with the same name as the object. Custom - object names always end in "__c". An example of the object directory for the Account standard object is - "force-app/main/default/objects/Account" An example custom object directory is - "force-app/main/default/objects/MyObject__c" - - If you don't specify this flag, the command prompts you to choose from your local objects. -``` - -_See code: [src/commands/schema/generate/field.ts](https://github.com/salesforcecli/plugin-sobject/blob/1.1.20/src/commands/schema/generate/field.ts)_ - -## `sf schema generate platformevent` - -Generate metadata source files for a new platform event. - -``` -USAGE - $ sf schema generate platformevent -l - -FLAGS - -l, --label= (required) The platform event's label. - -DESCRIPTION - Generate metadata source files for a new platform event. - - 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 - $ sf generate metadata platformevent - -EXAMPLES - Create a platform event with the specified label: - - $ sf schema generate platformevent --label "My Platform Event" -``` - -_See code: [src/commands/schema/generate/platformevent.ts](https://github.com/salesforcecli/plugin-sobject/blob/1.1.20/src/commands/schema/generate/platformevent.ts)_ - -## `sf schema generate sobject` - -Generate metadata source files for a new custom object. - -``` -USAGE - $ sf schema generate sobject -l [-f] - -FLAGS - -f, --use-default-features Enable all optional features without prompting. - -l, --label= (required) The custom object's label. - -DESCRIPTION - Generate metadata source files for a new custom object. - - This command is interactive and must be run in a Salesforce DX project directory. You're required to specify the - object's label with the "--label" flag. The command uses this label to provide intelligent suggestions for other - object properties, such as its API name and plural label. - - All Salesforce objects are required to have a Name field, so this command also prompts you for the label and type of - the Name field. Run the "sf metadata generate field" command to create additional fields for the object. - - To reduce the number of prompts, use the "--use-default-features" flag to automatically enable some features, such as - reporting and search on the object. - -ALIASES - $ sf generate metadata sobject - -EXAMPLES - Create a custom object with the specified label and be prompted for additional information: - - $ sf schema generate sobject --label "My Object" - - Create a custom object and enable optional features without prompting: - - $ sf schema generate sobject --label "My Object" --use-default-features - -FLAG DESCRIPTIONS - -f, --use-default-features Enable all optional features without prompting. - - Enables these features: - - - Search: Allows users to find the custom object's records when they search, including SOSL. - - Feeds: Enables feed tracking. - - Reports: Allows reporting of the data in the custom object records. - - History: Enables object history tracking. - - Activities: Allows users to associate tasks and scheduled calendar events related to the custom object records. - - Bulk API: With Sharing and Streaming API, classifies the custom object as an Enterprise Application object. - - Sharing: With Bulk API and Streaming API, classifies the custom object as an Enterprise Application object. - - Streaming API: With Bulk API and Sharing, classifies the custom object as an Enterprise Application object. -``` - -_See code: [src/commands/schema/generate/sobject.ts](https://github.com/salesforcecli/plugin-sobject/blob/1.1.20/src/commands/schema/generate/sobject.ts)_ - -## `sf schema generate tab` - -Generate the metadata source files for a new custom tab on a custom object. - -``` -USAGE - $ sf schema generate tab -o -d -i [--json] - -FLAGS - -d, --directory= (required) Path to a "tabs" directory that will contain the source files for your new tab. - -i, --icon= (required) [default: 1] Number from 1 to 100 that specifies the color scheme and icon for the - custom tab. - -o, --object= (required) API name of the custom object you're generating a tab for. - -GLOBAL FLAGS - --json Format output as json. - -DESCRIPTION - Generate the metadata source files for a new custom tab on a custom object. - - Custom tabs let you display custom object data or other web content in Salesforce. Custom tabs appear in Salesforce as - an item in the app’s navigation bar and in the App Launcher. - - This command must be run in a Salesforce DX project directory. You must pass all required information to it with the - required flags. The source files for the custom object for which you're generating a tab don't need to exist in your - local project. - -ALIASES - $ sf generate metadata tab - -EXAMPLES - Create a tab on the `MyObject__c` custom object: - - $ sf schema generate tab --object `MyObject__c` --icon 54 --directory force-app/main/default/tabs - -FLAG DESCRIPTIONS - -i, --icon= Number from 1 to 100 that specifies the color scheme and icon for the custom tab. - - See https://lightningdesignsystem.com/icons/#custom for the available icons. - - -o, --object= API name of the custom object you're generating a tab for. - - The API name for a custom object always ends in `__c`, such as `MyObject__c`. -``` - -_See code: [src/commands/schema/generate/tab.ts](https://github.com/salesforcecli/plugin-sobject/blob/1.1.20/src/commands/schema/generate/tab.ts)_ +- [`sf schema`](docs/schema.md) - Generate metadata files. diff --git a/package.json b/package.json index 7011526a..ec6ff848 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/plugin-sobject", "description": "Create objects, fields, tabs, etc", - "version": "1.1.20", + "version": "1.1.21", "author": "Salesforce", "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": {