|
1 | 1 | # summary |
2 | 2 |
|
3 | | -Generate local metadata for a custom object |
| 3 | +Generate metadata source files for a new custom object. |
4 | 4 |
|
5 | 5 | # description |
6 | 6 |
|
7 | | -Interactively generate local metadata for a custom object |
| 7 | +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. |
| 8 | + |
| 9 | +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. |
| 10 | + |
| 11 | +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. |
8 | 12 |
|
9 | 13 | # flags.label.summary |
10 | 14 |
|
11 | | -The label of the object. |
| 15 | +The custom object's label. |
12 | 16 |
|
13 | 17 | # flags.use-default-features.summary |
14 | 18 |
|
15 | 19 | Enable all optional features without prompting. |
16 | 20 |
|
17 | 21 | # flags.use-default-features.description |
18 | 22 |
|
19 | | -Enables search, feeds, reports, history, activities, bulk API, sharing, and streaming API. |
| 23 | +Enables these features: |
| 24 | + |
| 25 | +* Search: Allows users to find the custom object's records when they search, including SOSL. |
| 26 | +* Feeds: Enables feed tracking. |
| 27 | +* Reports: Allows reporting of the data in the custom object records. |
| 28 | +* History: Enables object history tracking. |
| 29 | +* Activities: Allows users to associate tasks and scheduled calendar events related to the custom object records. |
| 30 | +* Bulk API: With Sharing and Streaming API, classifies the custom object as an Enterprise Application object. |
| 31 | +* Sharing: With Bulk API and Streaming API, classifies the custom object as an Enterprise Application object. |
| 32 | +* Streaming API: With Bulk API and Sharing, classifies the custom object as an Enterprise Application object. |
20 | 33 |
|
21 | 34 | # examples |
22 | 35 |
|
23 | | -- Create an object with a given Label and be prompted for additional information |
| 36 | +- Create a custom object with the specified label and be prompted for additional information: |
24 | 37 |
|
25 | | -<%= config.bin %> <%= command.id %> --label "My Object" |
| 38 | + <%= config.bin %> <%= command.id %> --label "My Object" |
26 | 39 |
|
27 | | -- Create an object and opt in to most defaults (see flag help for details) |
| 40 | +- Create a custom object and enable optional features without prompting: |
28 | 41 |
|
29 | | -<%= config.bin %> <%= command.id %> --label "My Object" --use-default-features |
| 42 | + <%= config.bin %> <%= command.id %> --label "My Object" --use-default-features |
30 | 43 |
|
31 | 44 | # success |
32 | 45 |
|
33 | | -Created %s |
| 46 | +Created %s. |
34 | 47 |
|
35 | 48 | # success.advice |
36 | 49 |
|
37 | | -If you deploy the file to a source-tracking org, you will want to retrieve the result since additional properties and defaults will be created in the org |
| 50 | +The first time you deploy your new custom object to a source-tracking org, the org creates additional properties and sets new defaults on it. For this reason, we recommend that you immediately retrieve the custom object so your local source files are updated with this new information. |
38 | 51 |
|
39 | 52 | # success.field |
40 | 53 |
|
41 | | -Add a field with <%= config.bin %> generate metadata field -o %s -l "Your Field" |
| 54 | +Run this command to add a field to your object: sf generate metadata field --object %s --label "Your Field" |
42 | 55 |
|
43 | 56 | # prompts.sharingModel |
44 | 57 |
|
45 | | -Org wide sharing model |
| 58 | +Org-wide sharing model (default access level for the object's records): |
0 commit comments