diff --git a/README.md b/README.md
index c14af6c..c4b91db 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ NOTE ABOUT THE TEST DIRECTORY: the "test" directory is _not_ needed for sandbox
## Latest Released Unlocked Package Install URL
-`/packaging/installPackage.apexp?p0=04t4x000000RUUUAA4`
+`/packaging/installPackage.apexp?p0=04t4x000000RqyHAAS`
## Display Types
diff --git a/config/project-scratch-installtesting.json b/config/project-scratch-installtesting.json
new file mode 100644
index 0000000..7dd49eb
--- /dev/null
+++ b/config/project-scratch-installtesting.json
@@ -0,0 +1,5 @@
+{
+ "orgName": "RecordType Picker Install Testing",
+ "edition": "Enterprise",
+ "features": []
+ }
\ No newline at end of file
diff --git a/sfdx-project.json b/sfdx-project.json
index 9d74b8a..c8a114c 100644
--- a/sfdx-project.json
+++ b/sfdx-project.json
@@ -4,8 +4,8 @@
"path": "src",
"default": true,
"package": "Record Type Picker",
- "versionName": "ver 0.1",
- "versionNumber": "0.1.0.NEXT",
+ "versionName": "ver 0.3",
+ "versionNumber": "0.3.0.NEXT",
"unpackagedMetadata": {
"path": "tests"
},
@@ -13,14 +13,16 @@
"permissionSets": [
"RecordTypePickerPermissionsTesting"
]
- }
+ },
+ "releaseNotesUrl": "https://github.com/jkranz-rk/RecordTypePicker",
+ "postInstallUrl": "https://github.com/jkranz-rk/RecordTypePicker"
},
{
"path": "tests"
}
],
"name": "RecordTypePicker",
- "namespace": "",
+ "namespace": "rtp",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "55.0",
"packageAliases": {
@@ -28,6 +30,10 @@
"Record Type Picker@0.1.0-1-feature/unlockedpackaging": "04t4x000000RUQ2AAO",
"Record Type Picker@0.1.0-2-feature/unlockedpackaging": "04t4x000000RUQ7AAO",
"Record Type Picker@0.1.0-3-feature/unlockedpackaging": "04t4x000000RUQCAA4",
- "Record Type Picker@0.1.0-2": "04t4x000000RUUUAA4"
+ "Record Type Picker@0.1.0-2": "04t4x000000RUUUAA4",
+ "Record Type Picker@0.2.0-2": "04t4x000000RqffAAC",
+ "Record Type Picker@0.2.0-3": "04t4x000000RqfkAAC",
+ "Record Type Picker@0.2.0-4": "04t4x000000RqyCAAS",
+ "Record Type Picker@0.3.0-1": "04t4x000000RqyHAAS"
}
}
\ No newline at end of file
diff --git a/src/main/default/classes/RecordTypePickerController.cls b/src/main/default/classes/RecordTypePickerController.cls
index 41b214a..2b9287f 100644
--- a/src/main/default/classes/RecordTypePickerController.cls
+++ b/src/main/default/classes/RecordTypePickerController.cls
@@ -40,6 +40,8 @@ global with sharing class RecordTypePickerController {
@InvocableMethod(
label='Record Types for Running User'
description='Input an Object\'s API name, returns a collection of Record Types that are available to the running user'
+ category='Record Types'
+ iconName='slds:standard:relationship'
)
/**
*/
diff --git a/src/main/default/lwc/cpeHelper/cpeHelper.js b/src/main/default/lwc/cpeHelper/cpeHelper.js
index 310e38b..4e8008f 100644
--- a/src/main/default/lwc/cpeHelper/cpeHelper.js
+++ b/src/main/default/lwc/cpeHelper/cpeHelper.js
@@ -33,6 +33,20 @@ const flowConstants = {
}
};
+const convertBooleanFlowToReal = (boolVal) => {
+ if (boolVal === '$GlobalConstant.True') {
+ return true;
+ } else if (boolVal === '$GlobalConstant.False') {
+ return false;
+ } else {
+ return boolVal;
+ }
+};
+
+const convertBooleanRealToFlow = (boolVal) => {
+ return boolVal ? '$GlobalConstant.True' : '$GlobalConstant.False';
+};
+
const defaultProperties = {
objectApiName : {
name : 'objectApiName',
@@ -49,9 +63,9 @@ const defaultProperties = {
value : 'picker',
valueDataType : 'String'
},
- showDescription : {
- name : 'showDescription',
- value : true,
+ hideDescriptions : {
+ name : 'hideDescriptions',
+ value : false,
valueDataType : 'Boolean'
},
autoNavigateNext : {
@@ -61,4 +75,4 @@ const defaultProperties = {
}
};
-export {notifyPropertyChange, flowConstants, defaultProperties};
\ No newline at end of file
+export {notifyPropertyChange, flowConstants, defaultProperties, convertBooleanFlowToReal, convertBooleanRealToFlow};
\ No newline at end of file
diff --git a/src/main/default/lwc/recordTypePicker/recordTypePicker.js b/src/main/default/lwc/recordTypePicker/recordTypePicker.js
index 7e3d46d..8847463 100644
--- a/src/main/default/lwc/recordTypePicker/recordTypePicker.js
+++ b/src/main/default/lwc/recordTypePicker/recordTypePicker.js
@@ -15,16 +15,17 @@ export default class RecordTypePicker extends LightningElement {
@api availableRecordTypes;
@api objectApiName;
- @api label;
+
+ @api
get label(){
return this._label;
}
set label(val){
this._label = val;
}
- _label = 'Select a RecordType';
+ _label = 'Select a Record Type';
- @api autoNavigateNext;
+ @api
get autoNavigateNext(){
return this._autoNavigateNext;
}
@@ -33,16 +34,16 @@ export default class RecordTypePicker extends LightningElement {
}
_autoNavigateNext = false;
- @api showDescription;
- get showDescription(){
- return this._showDescription;
+ @api
+ get hideDescriptions(){
+ return this._hideDescriptions;
}
- set showDescription(val){
- this._showDescription = val;
+ set hideDescriptions(val){
+ this._hideDescriptions = val;
}
- _showDescription = true;
+ _hideDescriptions;
- @api displayType;
+ @api
get displayType(){
return this._displayType;
}
@@ -51,7 +52,7 @@ export default class RecordTypePicker extends LightningElement {
}
_displayType = 'picker';
- @api mode;
+ @api
get mode(){
return this._mode;
}
@@ -60,6 +61,10 @@ export default class RecordTypePicker extends LightningElement {
}
_mode = 'live';
+ // deprecated in favor of hideDescriptions, since we want the default
+ // value to be `True`, its a bad practice to set boolean defaults to `True`
+ @api showDescription;
+
_error;
_selectedValue;
@@ -108,7 +113,7 @@ export default class RecordTypePicker extends LightningElement {
};
get picklistOptions(){
- if (this.showDescription){
+ if (!this.hideDescriptions){
return this.availableRecordTypes.map((rt) => {
return {
value: rt.Id,
@@ -124,7 +129,6 @@ export default class RecordTypePicker extends LightningElement {
};
});
}
-
}
handleChange(event){
diff --git a/src/main/default/lwc/recordTypePicker/recordTypePicker.js-meta.xml b/src/main/default/lwc/recordTypePicker/recordTypePicker.js-meta.xml
index aa35e14..a075182 100644
--- a/src/main/default/lwc/recordTypePicker/recordTypePicker.js-meta.xml
+++ b/src/main/default/lwc/recordTypePicker/recordTypePicker.js-meta.xml
@@ -10,7 +10,7 @@
+ configurationEditor="rtp-record-type-picker-cpe">
+
\ No newline at end of file
diff --git a/src/main/default/lwc/recordTypePicker/recordTypeRadioGroup.html b/src/main/default/lwc/recordTypePicker/recordTypeRadioGroup.html
index 9811eb8..b879176 100644
--- a/src/main/default/lwc/recordTypePicker/recordTypeRadioGroup.html
+++ b/src/main/default/lwc/recordTypePicker/recordTypeRadioGroup.html
@@ -9,7 +9,7 @@