@salesforce/plugin-custom-metadata 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -12
- package/LICENSE.txt +2 -2
- package/README.md +137 -133
- package/lib/commands/force/cmdt/create.d.ts +8 -2
- package/lib/commands/force/cmdt/create.js +15 -21
- package/lib/commands/force/cmdt/create.js.map +1 -1
- package/lib/commands/force/cmdt/field/create.d.ts +7 -2
- package/lib/commands/force/cmdt/field/create.js +15 -20
- package/lib/commands/force/cmdt/field/create.js.map +1 -1
- package/lib/commands/force/cmdt/generate.d.ts +6 -2
- package/lib/commands/force/cmdt/generate.js +79 -150
- package/lib/commands/force/cmdt/generate.js.map +1 -1
- package/lib/commands/force/cmdt/record/create.d.ts +14 -3
- package/lib/commands/force/cmdt/record/create.js +25 -33
- package/lib/commands/force/cmdt/record/create.js.map +1 -1
- package/lib/commands/force/cmdt/record/insert.d.ts +2 -2
- package/lib/commands/force/cmdt/record/insert.js +28 -40
- package/lib/commands/force/cmdt/record/insert.js.map +1 -1
- package/lib/lib/helpers/createUtil.d.ts +10 -6
- package/lib/lib/helpers/createUtil.js +48 -100
- package/lib/lib/helpers/createUtil.js.map +1 -1
- package/lib/lib/helpers/fileWriter.d.ts +11 -11
- package/lib/lib/helpers/fileWriter.js +14 -24
- package/lib/lib/helpers/fileWriter.js.map +1 -1
- package/lib/lib/helpers/metadataUtil.d.ts +25 -51
- package/lib/lib/helpers/metadataUtil.js +55 -131
- package/lib/lib/helpers/metadataUtil.js.map +1 -1
- package/lib/lib/helpers/validationUtil.d.ts +25 -26
- package/lib/lib/helpers/validationUtil.js +66 -43
- package/lib/lib/helpers/validationUtil.js.map +1 -1
- package/lib/lib/interfaces/createConfig.d.ts +3 -2
- package/lib/lib/templates/templates.d.ts +8 -99
- package/lib/lib/templates/templates.js +38 -67
- package/lib/lib/templates/templates.js.map +1 -1
- package/messages/createField.json +22 -31
- package/messages/generate.json +38 -51
- package/messages/template.json +2 -2
- package/messages/validation.json +5 -0
- package/oclif.manifest.json +1 -1
- package/package.json +53 -42
- package/lib/lib/interfaces/customField.d.ts +0 -7
- package/lib/lib/interfaces/customField.js +0 -9
- package/lib/lib/interfaces/customField.js.map +0 -1
- package/lib/lib/interfaces/errorMessage.d.ts +0 -4
- package/lib/lib/interfaces/errorMessage.js +0 -9
- package/lib/lib/interfaces/errorMessage.js.map +0 -1
- package/lib/lib/interfaces/record.d.ts +0 -3
- package/lib/lib/interfaces/record.js +0 -9
- package/lib/lib/interfaces/record.js.map +0 -1
- package/lib/lib/interfaces/saveResults.d.ts +0 -5
- package/lib/lib/interfaces/saveResults.js +0 -9
- package/lib/lib/interfaces/saveResults.js.map +0 -1
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.Templates = void 0;
|
|
10
10
|
const core_1 = require("@salesforce/core");
|
|
11
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
12
|
+
const messages = core_1.Messages.load('@salesforce/plugin-custom-metadata', 'template', ['errorNotAValidType']);
|
|
13
|
+
const createPicklistValues = (values) => values.map((value) => ({ fullName: value, label: value, default: false }));
|
|
11
14
|
class Templates {
|
|
12
15
|
/**
|
|
13
16
|
* Using the given data and visibility, creates the body of a type metadata file
|
|
@@ -15,12 +18,11 @@ class Templates {
|
|
|
15
18
|
* @param data
|
|
16
19
|
* @param visibility
|
|
17
20
|
*/
|
|
18
|
-
createObjectXML(
|
|
21
|
+
createObjectXML({ label, pluralLabel }, visibility) {
|
|
19
22
|
let returnValue = '<?xml version="1.0" encoding="UTF-8"?>\n';
|
|
20
|
-
returnValue +=
|
|
21
|
-
|
|
22
|
-
returnValue += `\t<
|
|
23
|
-
returnValue += `\t<pluralLabel>${data.pluralLabel}</pluralLabel>\n`;
|
|
23
|
+
returnValue += '<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">\n';
|
|
24
|
+
returnValue += `\t<label>${label}</label>\n`;
|
|
25
|
+
returnValue += `\t<pluralLabel>${pluralLabel}</pluralLabel>\n`;
|
|
24
26
|
returnValue += `\t<visibility>${visibility}</visibility>\n`;
|
|
25
27
|
returnValue += '</CustomObject>\n';
|
|
26
28
|
return returnValue;
|
|
@@ -33,8 +35,7 @@ class Templates {
|
|
|
33
35
|
*/
|
|
34
36
|
createFieldXML(data, defaultToString) {
|
|
35
37
|
let returnValue = '<?xml version="1.0" encoding="UTF-8"?>\n';
|
|
36
|
-
returnValue +=
|
|
37
|
-
'<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">\n';
|
|
38
|
+
returnValue += '<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">\n';
|
|
38
39
|
returnValue += this.getFullName(data);
|
|
39
40
|
returnValue += this.getDescription(data);
|
|
40
41
|
returnValue += this.getExternalId(data);
|
|
@@ -60,44 +61,40 @@ class Templates {
|
|
|
60
61
|
createDefaultTypeStructure(fullName, type, label, picklistValues, decimalplaces = 0) {
|
|
61
62
|
const precision = 18 - decimalplaces;
|
|
62
63
|
const scale = decimalplaces;
|
|
64
|
+
const baseObject = { fullName, type, label, summaryFilterItems: [] };
|
|
63
65
|
switch (type) {
|
|
64
66
|
case 'Checkbox':
|
|
65
|
-
return {
|
|
66
|
-
case 'Date':
|
|
67
|
-
return { fullName, type, label };
|
|
68
|
-
case 'DateTime':
|
|
69
|
-
return { fullName, type, label };
|
|
67
|
+
return { ...baseObject, defaultValue: 'false' };
|
|
70
68
|
case 'Email':
|
|
71
|
-
return {
|
|
69
|
+
return { ...baseObject, unique: false };
|
|
72
70
|
case 'Number':
|
|
73
|
-
return {
|
|
71
|
+
return { ...baseObject, precision, scale, unique: false };
|
|
74
72
|
case 'Percent':
|
|
75
|
-
return {
|
|
76
|
-
case 'Phone':
|
|
77
|
-
return { fullName, type, label };
|
|
73
|
+
return { ...baseObject, precision, scale };
|
|
78
74
|
case 'Picklist':
|
|
79
75
|
return {
|
|
80
|
-
|
|
81
|
-
type,
|
|
82
|
-
label,
|
|
76
|
+
...baseObject,
|
|
83
77
|
valueSet: {
|
|
84
|
-
restricted:
|
|
78
|
+
restricted: true,
|
|
85
79
|
valueSetDefinition: {
|
|
86
|
-
sorted:
|
|
87
|
-
value:
|
|
80
|
+
sorted: false,
|
|
81
|
+
value: createPicklistValues(picklistValues),
|
|
88
82
|
},
|
|
83
|
+
valueSettings: [],
|
|
89
84
|
},
|
|
90
85
|
};
|
|
91
86
|
case 'Text':
|
|
92
|
-
return {
|
|
93
|
-
case 'TextArea':
|
|
94
|
-
return { fullName, type, label };
|
|
87
|
+
return { ...baseObject, unique: false, length: 100 };
|
|
95
88
|
case 'LongTextArea':
|
|
96
|
-
return {
|
|
89
|
+
return { ...baseObject, length: 32768, visibleLines: 3 };
|
|
90
|
+
case 'Date':
|
|
91
|
+
case 'DateTime':
|
|
92
|
+
case 'Phone':
|
|
93
|
+
case 'TextArea':
|
|
97
94
|
case 'Url':
|
|
98
|
-
return
|
|
95
|
+
return baseObject;
|
|
99
96
|
default:
|
|
100
|
-
return
|
|
97
|
+
return baseObject;
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
100
|
canConvert(type) {
|
|
@@ -129,7 +126,7 @@ class Templates {
|
|
|
129
126
|
return `\t<type>${this.getConvertType(data)}</type>\n`;
|
|
130
127
|
}
|
|
131
128
|
else {
|
|
132
|
-
throw core_1.
|
|
129
|
+
throw new core_1.SfError(messages.getMessage('errorNotAValidType', [data.type]));
|
|
133
130
|
}
|
|
134
131
|
}
|
|
135
132
|
getConvertType(data) {
|
|
@@ -143,48 +140,37 @@ class Templates {
|
|
|
143
140
|
}
|
|
144
141
|
}
|
|
145
142
|
getFullName(data) {
|
|
146
|
-
const name = data.fullName.endsWith('__c')
|
|
147
|
-
? data.fullName
|
|
148
|
-
: data.fullName + '__c';
|
|
143
|
+
const name = data.fullName.endsWith('__c') ? data.fullName : data.fullName + '__c';
|
|
149
144
|
return `\t<fullName>${name}</fullName>\n`;
|
|
150
145
|
}
|
|
151
146
|
getDescription(data) {
|
|
152
|
-
return data.description
|
|
153
|
-
? `\t<description>${data.description}</description>\n`
|
|
154
|
-
: '';
|
|
147
|
+
return data.description ? `\t<description>${data.description}</description>\n` : '';
|
|
155
148
|
}
|
|
156
149
|
getExternalId(data) {
|
|
157
|
-
return data.externalId
|
|
158
|
-
? `\t<externalId>${data.externalId}</externalId>\n`
|
|
159
|
-
: '';
|
|
150
|
+
return data.externalId ? `\t<externalId>${data.externalId}</externalId>\n` : '';
|
|
160
151
|
}
|
|
161
152
|
getFieldManageability(data) {
|
|
162
153
|
return `\t<fieldManageability>${data.fieldManageability || 'DeveloperControlled'}</fieldManageability>\n`;
|
|
163
154
|
}
|
|
164
155
|
getInlineHelpText(data) {
|
|
165
|
-
return data.inlineHelpText
|
|
166
|
-
? `\t<inlineHelpText>${data.inlineHelpText}</inlineHelpText>\n`
|
|
167
|
-
: '';
|
|
156
|
+
return data.inlineHelpText ? `\t<inlineHelpText>${data.inlineHelpText}</inlineHelpText>\n` : '';
|
|
168
157
|
}
|
|
169
158
|
getLabel(data) {
|
|
170
159
|
return `\t<label>${data.label}</label>\n`;
|
|
171
160
|
}
|
|
172
161
|
getRequiredTag(data) {
|
|
173
|
-
return data.unique ? `\t<unique>${data.unique}</unique>\n` : '';
|
|
162
|
+
return typeof data.unique === 'boolean' ? `\t<unique>${data.unique}</unique>\n` : '';
|
|
174
163
|
}
|
|
175
164
|
getPrecisionTag(data) {
|
|
176
165
|
return data.precision ? `\t<precision>${data.precision}</precision>\n` : '';
|
|
177
166
|
}
|
|
178
167
|
getScaleTag(data) {
|
|
179
|
-
return typeof data.scale !== 'undefined'
|
|
180
|
-
? `\t<scale>${data.scale}</scale>\n`
|
|
181
|
-
: '';
|
|
168
|
+
return typeof data.scale !== 'undefined' ? `\t<scale>${data.scale}</scale>\n` : '';
|
|
182
169
|
}
|
|
183
170
|
getLengthTag(data) {
|
|
184
171
|
// If field type is multiselect or
|
|
185
172
|
// data type is text with no length attribute then it is formula field then set the length to 32768 as we are setting the type LongTextArea
|
|
186
|
-
if (data.type === 'MultiselectPicklist' ||
|
|
187
|
-
(data.type === 'Text' && data.length === undefined)) {
|
|
173
|
+
if (data.type === 'MultiselectPicklist' || (data.type === 'Text' && data.length === undefined)) {
|
|
188
174
|
return '\t<length>32768</length>\n';
|
|
189
175
|
}
|
|
190
176
|
if (data.length) {
|
|
@@ -193,30 +179,22 @@ class Templates {
|
|
|
193
179
|
// For fields that are being translated from Custom objects that do not have a matching type they are
|
|
194
180
|
// being defaulted to a Text field. They need to have a minimum length to them
|
|
195
181
|
// e.g. Field types that are getting converted: Currency, Location, MasterDetail, Lookup
|
|
196
|
-
return !this.canConvert(data.type) && this.getConvertType(data) === 'Text'
|
|
197
|
-
? '\t<length>100</length>\n'
|
|
198
|
-
: '';
|
|
182
|
+
return !this.canConvert(data.type) && this.getConvertType(data) === 'Text' ? '\t<length>100</length>\n' : '';
|
|
199
183
|
}
|
|
200
184
|
getVisibleLines(data) {
|
|
201
185
|
if (data.type === 'Text' && data.length === undefined) {
|
|
202
186
|
return '\t<visibleLines>3</visibleLines>\n';
|
|
203
187
|
}
|
|
204
|
-
return data.visibleLines
|
|
205
|
-
? `\t<visibleLines>${data.visibleLines}</visibleLines>\n`
|
|
206
|
-
: '';
|
|
188
|
+
return data.visibleLines ? `\t<visibleLines>${data.visibleLines}</visibleLines>\n` : '';
|
|
207
189
|
}
|
|
208
190
|
getDefaultValue(data) {
|
|
209
191
|
if (data.type === 'Currency') {
|
|
210
|
-
return data.defaultValue
|
|
211
|
-
? `\t<defaultValue>'${data.defaultValue}'</defaultValue>\n`
|
|
212
|
-
: '';
|
|
192
|
+
return data.defaultValue ? `\t<defaultValue>'${data.defaultValue}'</defaultValue>\n` : '';
|
|
213
193
|
}
|
|
214
194
|
else if (data.type === 'Checkbox' && data.defaultValue === undefined) {
|
|
215
195
|
return '\t<defaultValue>false</defaultValue>\n';
|
|
216
196
|
}
|
|
217
|
-
return data.defaultValue
|
|
218
|
-
? `\t<defaultValue>${data.defaultValue}</defaultValue>\n`
|
|
219
|
-
: '';
|
|
197
|
+
return data.defaultValue ? `\t<defaultValue>${data.defaultValue}</defaultValue>\n` : '';
|
|
220
198
|
}
|
|
221
199
|
getValueSet(data) {
|
|
222
200
|
let fieldValue = '';
|
|
@@ -237,13 +215,6 @@ class Templates {
|
|
|
237
215
|
}
|
|
238
216
|
return fieldValue;
|
|
239
217
|
}
|
|
240
|
-
createPicklistValues(values) {
|
|
241
|
-
const picklistValues = [];
|
|
242
|
-
values.forEach((value) => {
|
|
243
|
-
picklistValues.push({ fullName: value, label: value });
|
|
244
|
-
});
|
|
245
|
-
return picklistValues;
|
|
246
|
-
}
|
|
247
218
|
}
|
|
248
219
|
exports.Templates = Templates;
|
|
249
220
|
//# sourceMappingURL=templates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/lib/templates/templates.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/lib/templates/templates.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAAqD;AACrD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,IAAI,CAAC,oCAAoC,EAAE,UAAU,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAGzG,MAAM,oBAAoB,GAAG,CAAC,MAAgB,EAAiB,EAAE,CAC/D,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AAE7E,MAAa,SAAS;IACpB;;;;;OAKG;IACI,eAAe,CAAC,EAAE,KAAK,EAAE,WAAW,EA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|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"outputDirectoryFlagDescription": "directory to store newly-created field definition files",
|
|
25
|
-
"outputDirectoryFlagLongDescription": "The directory to store the newly-created field definition files. The location can be an absolute path or relative to the current working directory. The default is the current directory.",
|
|
26
|
-
|
|
27
|
-
"invalidCustomFieldError": "'%s' is an invalid field. Custom fields can only contain alphanumeric characters, must begin with a letter, cannot end with an underscore, and cannot contain two consecutive underscore characters.",
|
|
28
|
-
"picklistValuesNotSuppliedError": "Picklist values are required when field type is Picklist.",
|
|
29
|
-
"invalidDecimalError": "%s is an invalid number. Number of decimal places must be greater than or equal to zero.",
|
|
30
|
-
"targetDirectory" : "target dir = %s",
|
|
31
|
-
"fileCreated": " created %s",
|
|
32
|
-
"fileUpdate":" updated %s"
|
|
2
|
+
"commandDescription": "generate a custom metadata field based on the field type provided",
|
|
3
|
+
"commandLongDescription": "Generate a custom metadata field based on the field type provided.",
|
|
4
|
+
"exampleCaption1": "Create a metadata file for a custom checkbox field:",
|
|
5
|
+
"exampleCaption2": "Create a metadata file for a custom picklist field:",
|
|
6
|
+
"exampleCaption3": "Create a metadata file for a custom number field:",
|
|
7
|
+
"nameFlagDescription": "unique name for the field",
|
|
8
|
+
"nameFlagLongDescription": "The unique name for the field.",
|
|
9
|
+
"fieldTypeDescription": "type of field",
|
|
10
|
+
"fieldTypeLongDescription": "The type of field.",
|
|
11
|
+
"picklistValuesFlagDescription": "comma-separated list of picklist values; required for Picklist fields",
|
|
12
|
+
"picklistValuesFlagLongDescription": "A comma-separated list of picklist values. These values are required when creating a Picklist field.",
|
|
13
|
+
"decimalplacesFlagDescription": "number of decimal places to use for Number or Percent fields",
|
|
14
|
+
"decimalplacesFlagLongDescription": "The number of decimal places to use for Number or Percent fields. The value must be greater than or equal to zero.",
|
|
15
|
+
"labelFlagDescription": "label for the field",
|
|
16
|
+
"labelFlagLongDescription": "The label for the field.",
|
|
17
|
+
"outputDirectoryFlagDescription": "directory to store newly-created field definition files",
|
|
18
|
+
"outputDirectoryFlagLongDescription": "The directory to store the newly-created field definition files. The location can be an absolute path or relative to the current working directory. The default is the current directory.",
|
|
19
|
+
"invalidCustomFieldError": "'%s' is an invalid field. Custom fields can only contain alphanumeric characters, must begin with a letter, cannot end with an underscore, and cannot contain two consecutive underscore characters.",
|
|
20
|
+
"picklistValuesNotSuppliedError": "Picklist values are required when field type is Picklist.",
|
|
21
|
+
"targetDirectory": "target dir = %s",
|
|
22
|
+
"fileCreated": " created %s",
|
|
23
|
+
"fileUpdate": " updated %s"
|
|
33
24
|
}
|
package/messages/generate.json
CHANGED
|
@@ -1,53 +1,40 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"recordsoutputdirFlagExample": "path/to/my/cmdt/record/directory",
|
|
41
|
-
|
|
42
|
-
"loglevelFlagDescription": "logging level for this command invocation",
|
|
43
|
-
"loglevelFlagLongDescription": "The logging level for this command invocation.",
|
|
44
|
-
|
|
45
|
-
"typenameFlagError": "Not a valid custom metadata type name",
|
|
46
|
-
"sobjectnameFlagError": "Not a valid custom setting/custom object name",
|
|
47
|
-
"sobjectnameNoResultError": "No sObject with name %s found in the org.",
|
|
48
|
-
"sourceusernameError": "No user found with the provided username or alias",
|
|
49
|
-
"sourceuserAuthenticationError": "Issue with authenticating to source org with targetusername provided: %s More info: %s.",
|
|
50
|
-
"generateError": "Failed to generate custom metadata. Reason: %s.",
|
|
51
|
-
"customSettingTypeError": "Cannot generate custom metadata for the custom setting %s. Check type and visibility.",
|
|
52
|
-
"queryError": "Cannot query records on %s. Failed with following error: %s."
|
|
2
|
+
"commandDescription": "generates a custom metadata type and all its records for the provided sObject",
|
|
3
|
+
"commandLongDescription": "Generates a custom metadata type and all its records for the provided sObject.",
|
|
4
|
+
"exampleCaption1": "Generate a custom metadata type from an sObject in the default target org:",
|
|
5
|
+
"exampleCaption2": "Generate a custom metadata type from an sObject in the specified target org; ignore unsupported field types instead of converting them to text:",
|
|
6
|
+
"exampleCaption3": "Generate a protected custom metadata type from an sObject in the default target org:",
|
|
7
|
+
"exampleCaption4": "Generate a protected custom metadata type with a specific label from an sObject in the default target org:",
|
|
8
|
+
"exampleCaption5": "Generate a custom metadata type from an sObject in the default target org; put the resulting type metadata file in the specified directory:",
|
|
9
|
+
"exampleCaption6": "Generate a custom metadata type from an sObject in the default target org; put the resulting record metadata file(s) in the specified directory:",
|
|
10
|
+
"visibilityFlagDescription": "visibility of the custom metadata type",
|
|
11
|
+
"visibilityFlagLongDescription": "The visibility of the custom metadata type.",
|
|
12
|
+
"devnameFlagDescription": "name of the custom metadata type",
|
|
13
|
+
"devnameFlagLongDescription": "The name of the custom metadata type.",
|
|
14
|
+
"labelFlagDescription": "label for the custom metadata type",
|
|
15
|
+
"labelFlagLongDescription": "The label for the custom metadata type.",
|
|
16
|
+
"labelFlagExample": "My CMDT",
|
|
17
|
+
"plurallabelFlagDescription": "plural version of the label value; if blank, uses label",
|
|
18
|
+
"plurallabelFlagLongDescription": "The plural version of the label value. If this flag is missing or blank, the singular label is used as the plural label.",
|
|
19
|
+
"plurallabelFlagExample": "My CMDTs",
|
|
20
|
+
"sobjectnameFlagDescription": "API name of the sObject source for custom metadata generation",
|
|
21
|
+
"sobjectnameFlagLongDescription": "The API name of the sObject source for custom metadata generation.",
|
|
22
|
+
"targetusernameFlagExample": "alias or user email of the org containing the source type",
|
|
23
|
+
"ignoreUnsupportedFlagDescription": "ignore unsupported field types",
|
|
24
|
+
"ignoreUnsupportedFlagLongDescription": "Ignore unsupported field types (these fields will not be created). The default is to create Text fields and convert the source value to text.",
|
|
25
|
+
"typeoutputdirFlagDescription": "directory to store newly-created custom metadata type files",
|
|
26
|
+
"typeoutputdirFlagLongDescription": "The directory to store newly-created custom metadata type files.",
|
|
27
|
+
"typeoutputdirFlagExample": "path/to/my/cmdt/directory",
|
|
28
|
+
"recordsoutputdirFlagDescription": "directory to store newly-created custom metadata record files",
|
|
29
|
+
"recordsoutputdirFlagLongDescription": "The directory to store newly-created custom metadata record files.",
|
|
30
|
+
"recordsoutputdirFlagExample": "path/to/my/cmdt/record/directory",
|
|
31
|
+
"loglevelFlagDescription": "logging level for this command invocation",
|
|
32
|
+
"loglevelFlagLongDescription": "The logging level for this command invocation.",
|
|
33
|
+
"typenameFlagError": "Not a valid custom metadata type name",
|
|
34
|
+
"sobjectnameNoResultError": "No sObject with name %s found in the org.",
|
|
35
|
+
"sourceusernameError": "No user found with the provided username or alias",
|
|
36
|
+
"sourceuserAuthenticationError": "Issue with authenticating to source org with targetusername provided: %s More info: %s.",
|
|
37
|
+
"generateError": "Failed to generate custom metadata. Reason: %s.",
|
|
38
|
+
"customSettingTypeError": "Cannot generate custom metadata for the custom setting %s. Check type and visibility.",
|
|
39
|
+
"queryError": "Cannot query records on %s. Failed with following error: %s."
|
|
53
40
|
}
|
package/messages/template.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
}
|
|
2
|
+
"errorNotAValidType": "'%s' is not a valid field type."
|
|
3
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sobjectnameFlagError": "Not a valid custom setting/custom object name: %s",
|
|
3
|
+
"invalidCMDTApiName": "'%s' is not a valid API name for a custom metadata type. Metadata names can contain only underscores and alphanumeric characters, must begin with a letter, cannot end with an underscore, and cannot contain two consecutive underscore characters.",
|
|
4
|
+
"notAValidRecordNameError": "'%s' is not a valid record name for a custom metadata record. Record names can only contain alphanumeric characters, must begin with a letter, cannot end with an underscore, and cannot contain two consecutive underscore characters."
|
|
5
|
+
}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.1.0","commands":{"force:cmdt:create":{"id":"force:cmdt:create","description":"creates a new custom metadata type in the current project","usage":"<%= command.id %> -n <string> [-l <string>] [-p <string>] [-v PackageProtected|Protected|Public] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a custom metadata type with developer name 'MyCustomType'; this name will also be used as the label:"," $ sfdx force:cmdt:create --typename MyCustomType","Create a protected custom metadata type with a specific label:"," $ sfdx force:cmdt:create --typename MyCustomType --label \"Custom Type\" --plurallabel \"Custom Types\" --visibility Protected"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"typename":{"name":"typename","type":"option","char":"n","description":"unique object name for the custom metadata type","required":true},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type"},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label"},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","options":["PackageProtected","Protected","Public"],"default":"Public"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store the newly-created custom metadata type files"}},"args":[{"name":"file"}]},"force:cmdt:generate":{"id":"force:cmdt:generate","description":"generates a custom metadata type and all its records for the provided sObject","usage":"<%= command.id %> -n <string> -s <string> [-l <string>] [-p <string>] [-v PackageProtected|Protected|Public] [-i] [-d <directory>] [-r <directory>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Generate a custom metadata type from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname MySourceObject__c","Generate a custom metadata type from an sObject in the specified target org; ignore unsupported field types instead of converting them to text:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname MySourceObject__c --ignoreunsupported --targetusername 'alias or user email of the org containing the source type'","Generate a protected custom metadata type from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomObject__c --visibility Protected","Generate a protected custom metadata type with a specific label from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --label \"My CMDT\" --plurallabel \"My CMDTs\" --sobjectname SourceCustomSetting__c --visibility Protected","Generate a custom metadata type from an sObject in the default target org; put the resulting type metadata file in the specified directory:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomSetting__c --typeoutputdir 'path/to/my/cmdt/directory'","Generate a custom metadata type from an sObject in the default target org; put the resulting record metadata file(s) in the specified directory:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomSetting__c --recordsoutputdir 'path/to/my/cmdt/record/directory'"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"devname":{"name":"devname","type":"option","char":"n","description":"name of the custom metadata type","required":true},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type"},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label"},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","options":["PackageProtected","Protected","Public"],"default":"Public"},"sobjectname":{"name":"sobjectname","type":"option","char":"s","description":"API name of the sObject source for custom metadata generation","required":true},"ignoreunsupported":{"name":"ignoreunsupported","type":"boolean","char":"i","description":"ignore unsupported field types","allowNo":false},"typeoutputdir":{"name":"typeoutputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata type files","default":"force-app/main/default/objects/"},"recordsoutputdir":{"name":"recordsoutputdir","type":"option","char":"r","description":"directory to store newly-created custom metadata record files","default":"force-app/main/default/customMetadata/"}},"args":[{"name":"file"}]},"force:cmdt:field:create":{"id":"force:cmdt:field:create","description":"generate a custom metadata field based on the field type provided","usage":"<%= command.id %> -n <string> -f Checkbox|Date|DateTime|Email|Number|Percent|Phone|Picklist|Text|TextArea|LongTextArea|Url [-p <array>] [-s <number>] [-l <string>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a metadata file for a custom checkbox field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Checkbox","Create a metadata file for a custom picklist field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Picklist --picklistvalues \"A,B,C\"","Create a metadata file for a custom number field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Number --decimalplaces 2"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"fieldname":{"name":"fieldname","type":"option","char":"n","description":"unique name for the field","required":true},"fieldtype":{"name":"fieldtype","type":"option","char":"f","description":"type of field","required":true,"helpValue":"(Checkbox|Date|DateTime|Email|Number|Percent|Phone|Picklist|Text|TextArea|LongTextArea|Url)","options":["Checkbox","Date","DateTime","Email","Number","Percent","Phone","Picklist","Text","TextArea","LongTextArea","Url"]},"picklistvalues":{"name":"picklistvalues","type":"option","char":"p","description":"comma-separated list of picklist values; required for Picklist fields"},"decimalplaces":{"name":"decimalplaces","type":"option","char":"s","description":"number of decimal places to use for Number or Percent fields","default":0},"label":{"name":"label","type":"option","char":"l","description":"label for the field"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created field definition files"}},"args":[{"name":"file"}]},"force:cmdt:record:create":{"id":"force:cmdt:record:create","description":"create a new record for a given custom metadata type in the current project","usage":"<%= command.id %> [name=value...] -t <string> -n <string> [-l <string>] [-p <string>] [-i <directory>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a record metadata file for custom metadata type 'MyCMT' with values specified for two custom fields:"," $ sfdx force:cmdt:record:create --typename MyCMT__mdt --recordname MyRecord My_Custom_Field_1=Foo My_Custom_Field_2=Bar","Create a protected record metadata file for custom metadata type 'MyCMT' with a specific label and values specified for two custom fields:"," $ sfdx force:cmdt:record:create --typename MyCMT__mdt --recordname MyRecord --label \"My Record\" --protected true My_Custom_Field_1=Foo My_Custom_Field_2=Bar"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"typename":{"name":"typename","type":"option","char":"t","description":"API name of the custom metadata type to create a record for","required":true},"recordname":{"name":"recordname","type":"option","char":"n","description":"name for the new record","required":true},"label":{"name":"label","type":"option","char":"l","description":"label for the new record"},"protected":{"name":"protected","type":"option","char":"p","description":"protect the record when it is in a managed package","options":["true","false"],"default":"false"},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","default":"force-app/main/default/customMetadata"}},"args":[]},"force:cmdt:record:insert":{"id":"force:cmdt:record:insert","description":"create new custom metadata type records from a CSV file","usage":"<%= command.id %> -f <string> -t <string> [-i <directory>] [-d <directory>] [-n <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create record metadata files for type 'My_CMDT_Name' (from your local project) based on values in a CSV file, using 'Name' as the column that specifies the record name:"," $ sfdx force:cmdt:record:insert --filepath path/to/my.csv --typename My_CMDT_Name","Create record metadata files for type 'My_CMDT_Name' (from the specified directory) based on values in a CSV file, using 'PrimaryKey' as the column that specifies the record name:"," $ sfdx force:cmdt:record:insert --filepath path/to/my.csv --typename My_CMDT_Name --inputdir \"path/to/my/cmdt/directory\" --namecolumn \"PrimaryKey\""],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"filepath":{"name":"filepath","type":"option","char":"f","description":"path to the CSV file","required":true},"typename":{"name":"typename","type":"option","char":"t","description":"API name of the custom metadata type","required":true},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","default":"force-app/main/default/customMetadata"},"namecolumn":{"name":"namecolumn","type":"option","char":"n","description":"column that is used to determine the name of the record","default":"Name"}},"args":[]}}}
|
|
1
|
+
{"version":"2.0.0","commands":{"force:cmdt:create":{"id":"force:cmdt:create","description":"creates a new custom metadata type in the current project","strict":true,"usage":"<%= command.id %> -n <string> [-l <string>] [-p <string>] [-v PackageProtected|Protected|Public] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a custom metadata type with developer name 'MyCustomType'; this name will also be used as the label:"," $ sfdx force:cmdt:create --typename MyCustomType","Create a protected custom metadata type with a specific label:"," $ sfdx force:cmdt:create --typename MyCustomType --label \"Custom Type\" --plurallabel \"Custom Types\" --visibility Protected"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"typename":{"name":"typename","type":"option","char":"n","description":"unique object name for the custom metadata type","required":true,"multiple":false},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type","multiple":false},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label","multiple":false},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","multiple":false,"options":["PackageProtected","Protected","Public"],"default":"Public"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store the newly-created custom metadata type files","multiple":false,"default":""}},"args":[{"name":"file"}],"longDescription":"Creates a new custom metadata type in the current project.","flagsConfig":{"typename":{"kind":"string","char":"n","description":"unique object name for the custom metadata type","longDescription":"The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.","required":true,"input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the custom metadata type","longDescription":"A label for the custom metadata type.","input":[],"multiple":false,"type":"option"},"plurallabel":{"kind":"string","char":"p","description":"plural version of the label value; if blank, uses label","longDescription":"The plural version of the label value. If this flag is missing or blank, the singular label is used as the plural label.","input":[],"multiple":false,"type":"option"},"visibility":{"kind":"enum","helpValue":"(PackageProtected|Protected|Public)","char":"v","description":"visibility of the custom metadata type","longDescription":"The visibility of the custom metadata type.","options":["PackageProtected","Protected","Public"],"default":"Public","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store the newly-created custom metadata type files","longDescription":"The directory to store the newly-created custom metadata type files. The location can be an absolute path or relative to the current working directory. The default is the current directory.","default":"","input":[],"multiple":false,"type":"option"}},"requiresProject":true},"force:cmdt:generate":{"id":"force:cmdt:generate","description":"generates a custom metadata type and all its records for the provided sObject","strict":true,"usage":"<%= command.id %> -n <string> -s <string> [-l <string>] [-p <string>] [-v PackageProtected|Protected|Public] [-i] [-d <directory>] [-r <directory>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Generate a custom metadata type from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname MySourceObject__c","Generate a custom metadata type from an sObject in the specified target org; ignore unsupported field types instead of converting them to text:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname MySourceObject__c --ignoreunsupported --targetusername 'alias or user email of the org containing the source type'","Generate a protected custom metadata type from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomObject__c --visibility Protected","Generate a protected custom metadata type with a specific label from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --label \"My CMDT\" --plurallabel \"My CMDTs\" --sobjectname SourceCustomSetting__c --visibility Protected","Generate a custom metadata type from an sObject in the default target org; put the resulting type metadata file in the specified directory:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomSetting__c --typeoutputdir 'path/to/my/cmdt/directory'","Generate a custom metadata type from an sObject in the default target org; put the resulting record metadata file(s) in the specified directory:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomSetting__c --recordsoutputdir 'path/to/my/cmdt/record/directory'"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"devname":{"name":"devname","type":"option","char":"n","description":"name of the custom metadata type","required":true,"multiple":false},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type","multiple":false},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label","multiple":false},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","multiple":false,"options":["PackageProtected","Protected","Public"],"default":"Public"},"sobjectname":{"name":"sobjectname","type":"option","char":"s","description":"API name of the sObject source for custom metadata generation","required":true,"multiple":false},"ignoreunsupported":{"name":"ignoreunsupported","type":"boolean","char":"i","description":"ignore unsupported field types","allowNo":false},"typeoutputdir":{"name":"typeoutputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata type files","multiple":false,"default":"force-app/main/default/objects"},"recordsoutputdir":{"name":"recordsoutputdir","type":"option","char":"r","description":"directory to store newly-created custom metadata record files","multiple":false,"default":"force-app/main/default/customMetadata"}},"args":[{"name":"file"}],"longDescription":"Generates a custom metadata type and all its records for the provided sObject.","flagsConfig":{"devname":{"kind":"string","char":"n","required":true,"description":"name of the custom metadata type","longDescription":"The name of the custom metadata type.","input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the custom metadata type","longDescription":"The label for the custom metadata type.","input":[],"multiple":false,"type":"option"},"plurallabel":{"kind":"string","char":"p","description":"plural version of the label value; if blank, uses label","longDescription":"The plural version of the label value. If this flag is missing or blank, the singular label is used as the plural label.","input":[],"multiple":false,"type":"option"},"visibility":{"kind":"enum","helpValue":"(PackageProtected|Protected|Public)","char":"v","description":"visibility of the custom metadata type","longDescription":"The visibility of the custom metadata type.","options":["PackageProtected","Protected","Public"],"default":"Public","input":[],"multiple":false,"type":"option"},"sobjectname":{"kind":"string","char":"s","required":true,"description":"API name of the sObject source for custom metadata generation","longDescription":"The API name of the sObject source for custom metadata generation.","input":[],"multiple":false,"type":"option"},"ignoreunsupported":{"kind":"boolean","char":"i","description":"ignore unsupported field types","longDescription":"Ignore unsupported field types (these fields will not be created). The default is to create Text fields and convert the source value to text.","allowNo":false,"type":"boolean"},"typeoutputdir":{"kind":"directory","char":"d","description":"directory to store newly-created custom metadata type files","longDescription":"The directory to store newly-created custom metadata type files.","default":"force-app/main/default/objects","input":[],"multiple":false,"type":"option"},"recordsoutputdir":{"kind":"directory","char":"r","description":"directory to store newly-created custom metadata record files","longDescription":"The directory to store newly-created custom metadata record files.","default":"force-app/main/default/customMetadata","input":[],"multiple":false,"type":"option"}},"requiresUsername":true,"requiresProject":true},"force:cmdt:field:create":{"id":"force:cmdt:field:create","description":"generate a custom metadata field based on the field type provided","strict":true,"usage":"<%= command.id %> -n <string> -f Checkbox|Date|DateTime|Email|Number|Percent|Phone|Picklist|Text|TextArea|LongTextArea|Url [-p <array>] [-s <number>] [-l <string>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a metadata file for a custom checkbox field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Checkbox","Create a metadata file for a custom picklist field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Picklist --picklistvalues \"A,B,C\"","Create a metadata file for a custom number field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Number --decimalplaces 2"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"fieldname":{"name":"fieldname","type":"option","char":"n","description":"unique name for the field","required":true,"multiple":false},"fieldtype":{"name":"fieldtype","type":"option","char":"f","description":"type of field","required":true,"helpValue":"(Checkbox|Date|DateTime|Email|Number|Percent|Phone|Picklist|Text|TextArea|LongTextArea|Url)","multiple":false,"options":["Checkbox","Date","DateTime","Email","Number","Percent","Phone","Picklist","Text","TextArea","LongTextArea","Url"]},"picklistvalues":{"name":"picklistvalues","type":"option","char":"p","description":"comma-separated list of picklist values; required for Picklist fields","multiple":false},"decimalplaces":{"name":"decimalplaces","type":"option","char":"s","description":"number of decimal places to use for Number or Percent fields","multiple":false,"default":0},"label":{"name":"label","type":"option","char":"l","description":"label for the field","multiple":false},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created field definition files","multiple":false,"default":""}},"args":[{"name":"file"}],"longDescription":"Generate a custom metadata field based on the field type provided.","flagsConfig":{"fieldname":{"kind":"string","char":"n","required":true,"description":"unique name for the field","longDescription":"The unique name for the field.","input":[],"multiple":false,"type":"option"},"fieldtype":{"kind":"enum","helpValue":"(Checkbox|Date|DateTime|Email|Number|Percent|Phone|Picklist|Text|TextArea|LongTextArea|Url)","char":"f","required":true,"description":"type of field","longDescription":"The unique name for the field.","options":["Checkbox","Date","DateTime","Email","Number","Percent","Phone","Picklist","Text","TextArea","LongTextArea","Url"],"input":[],"multiple":false,"type":"option"},"picklistvalues":{"kind":"array","char":"p","description":"comma-separated list of picklist values; required for Picklist fields","longDescription":"A comma-separated list of picklist values. These values are required when creating a Picklist field.","input":[],"multiple":false,"type":"option"},"decimalplaces":{"kind":"number","char":"s","description":"number of decimal places to use for Number or Percent fields","longDescription":"The number of decimal places to use for Number or Percent fields. The value must be greater than or equal to zero.","default":0,"min":0,"input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the field","longDescription":"The label for the field.","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store newly-created field definition files","longDescription":"The directory to store the newly-created field definition files. The location can be an absolute path or relative to the current working directory. The default is the current directory.","default":"","input":[],"multiple":false,"type":"option"}},"requiresProject":true},"force:cmdt:record:create":{"id":"force:cmdt:record:create","description":"create a new record for a given custom metadata type in the current project","strict":true,"usage":"<%= command.id %> [name=value...] -t <string> -n <string> [-l <string>] [-p <string>] [-i <directory>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a record metadata file for custom metadata type 'MyCMT' with values specified for two custom fields:"," $ sfdx force:cmdt:record:create --typename MyCMT__mdt --recordname MyRecord My_Custom_Field_1=Foo My_Custom_Field_2=Bar","Create a protected record metadata file for custom metadata type 'MyCMT' with a specific label and values specified for two custom fields:"," $ sfdx force:cmdt:record:create --typename MyCMT__mdt --recordname MyRecord --label \"My Record\" --protected true My_Custom_Field_1=Foo My_Custom_Field_2=Bar"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"typename":{"name":"typename","type":"option","char":"t","description":"API name of the custom metadata type to create a record for","required":true,"multiple":false},"recordname":{"name":"recordname","type":"option","char":"n","description":"name for the new record","required":true,"multiple":false},"label":{"name":"label","type":"option","char":"l","description":"label for the new record","multiple":false},"protected":{"name":"protected","type":"option","char":"p","description":"protect the record when it is in a managed package","multiple":false,"options":["true","false"],"default":"false"},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","multiple":false,"default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","multiple":false,"default":"force-app/main/default/customMetadata"}},"args":[],"longDescription":"Create a new record for a given custom metadata type in the current project.","flagsConfig":{"typename":{"kind":"string","char":"t","description":"API name of the custom metadata type to create a record for","longDescription":"The API name of the custom metadata type to create a record for.","required":true,"input":[],"multiple":false,"type":"option"},"recordname":{"kind":"string","char":"n","description":"name for the new record","longDescription":"The name for the new record.","required":true,"input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the new record","longDescription":"The label for the new record.","input":[],"multiple":false,"type":"option"},"protected":{"kind":"string","char":"p","description":"protect the record when it is in a managed package","longDescription":"Protect the record when it is in a managed package. Protected records can only be accessed by code in the same managed package namespace.","options":["true","false"],"default":"false","input":[],"multiple":false,"type":"option"},"inputdir":{"kind":"directory","char":"i","description":"directory to pull the custom metadata type definition from","longDescription":"The directory to pull the custom metadata type definition from.","default":"force-app/main/default/objects","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store newly-created custom metadata record files","longDescription":"The directory to store newly-created custom metadata record files.","default":"force-app/main/default/customMetadata","input":[],"multiple":false,"type":"option"}},"varargs":{"required":false},"requiresProject":true},"force:cmdt:record:insert":{"id":"force:cmdt:record:insert","description":"create new custom metadata type records from a CSV file","strict":true,"usage":"<%= command.id %> -f <string> -t <string> [-i <directory>] [-d <directory>] [-n <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create record metadata files for type 'My_CMDT_Name' (from your local project) based on values in a CSV file, using 'Name' as the column that specifies the record name:"," $ sfdx force:cmdt:record:insert --filepath path/to/my.csv --typename My_CMDT_Name","Create record metadata files for type 'My_CMDT_Name' (from the specified directory) based on values in a CSV file, using 'PrimaryKey' as the column that specifies the record name:"," $ sfdx force:cmdt:record:insert --filepath path/to/my.csv --typename My_CMDT_Name --inputdir \"path/to/my/cmdt/directory\" --namecolumn \"PrimaryKey\""],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"filepath":{"name":"filepath","type":"option","char":"f","description":"path to the CSV file","required":true,"multiple":false},"typename":{"name":"typename","type":"option","char":"t","description":"API name of the custom metadata type","required":true,"multiple":false},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","multiple":false,"default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","multiple":false,"default":"force-app/main/default/customMetadata"},"namecolumn":{"name":"namecolumn","type":"option","char":"n","description":"column that is used to determine the name of the record","multiple":false,"default":"Name"}},"args":[],"longDescription":"Create new custom metadata type records from a CSV file.","flagsConfig":{"filepath":{"kind":"string","char":"f","description":"path to the CSV file","longDescription":"The path to the CSV file.","required":true,"input":[],"multiple":false,"type":"option"},"typename":{"kind":"string","char":"t","description":"API name of the custom metadata type","longDescription":"The API Name of the custom metadata type. The '__mdt' suffix will be appended to the end of the name if it is omitted.","required":true,"input":[],"multiple":false,"type":"option"},"inputdir":{"kind":"directory","char":"i","description":"directory to pull the custom metadata type definition from","longDescription":"The directory to pull the custom metadata type definition from.","default":"force-app/main/default/objects","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store newly-created custom metadata record files","longDescription":"The directory to store newly-created custom metadata record files.","default":"force-app/main/default/customMetadata","input":[],"multiple":false,"type":"option"},"namecolumn":{"kind":"string","char":"n","description":"column that is used to determine the name of the record","longDescription":"The column that is used to determine the name of the record.","default":"Name","input":[],"multiple":false,"type":"option"}},"requiresProject":true}}}
|