-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
104 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
**/jsconfig.json | ||
# .forceignore v2 | ||
# List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status | ||
# More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm | ||
# | ||
|
||
# Standard metadata | ||
package.xml | ||
**/appMenus/** | ||
**/appSwitcher/** | ||
**/objectTranslations/** | ||
**/profiles/** | ||
**/settings/** | ||
|
||
# LWC configuration files | ||
**/jsconfig.json | ||
**/.eslintrc.json | ||
|
||
# LWC Jest | ||
**/__tests__/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
public with sharing class FieldLabelController { | ||
@AuraEnabled(cacheable=true) | ||
public static String getFieldLabels(String objectName, String fieldAPIName) { | ||
System.debug('objectName: ' + objectName); | ||
System.debug('fieldApiNames: ' + fieldAPIName); | ||
List<String> fieldLabels = new List<String>(); | ||
Map<String, Schema.SObjectField> fieldMap = Schema.getGlobalDescribe().get(objectName).getDescribe().fields.getMap(); | ||
return fieldMap.get(fieldAPIName).getDescribe().getLabel(); | ||
} | ||
@AuraEnabled(cacheable=true) | ||
public static String getSObjectType(sObject record){ | ||
System.debug('records: ' + record); | ||
String sObjectType = null; | ||
try { | ||
Id recordId = record.Id; | ||
sObjectType = recordId.getSObjectType().getDescribe().getName(); | ||
System.debug('sObjectType: ' + sObjectType); | ||
} catch (Exception e) { | ||
throw new AuraHandledException(e.getMessage()); | ||
} | ||
return sObjectType; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
force-app/main/default/classes/FieldLabelController.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>59.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
12 changes: 12 additions & 0 deletions
12
force-app/main/default/classes/FieldLabelControllerTest.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@isTest | ||
public class FieldLabelControllerTest { | ||
@isTest | ||
static void basicTest () { | ||
// tests FieldLabelController | ||
List<String> fieldApiNames = new List<String> (); | ||
fieldApiNames.add('CreatedDate'); | ||
fieldApiNames.add('LastModifiedDate'); | ||
List<String> fieldLabels = FieldLabelController.getFieldLabels('Account',fieldApiNames); | ||
System.assertEquals('Created Date', fieldLabels[0]); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
force-app/main/default/classes/FieldLabelControllerTest.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>59.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
6 changes: 6 additions & 0 deletions
6
force-app/main/default/classes/StickySelectronFieldDefinition.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
public class StickySelectronFieldDefinition { | ||
@AuraEnabled | ||
public String fieldApiName; | ||
@AuraEnabled | ||
public String label; | ||
} |
5 changes: 5 additions & 0 deletions
5
force-app/main/default/classes/StickySelectronFieldDefinition.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>59.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
2 changes: 1 addition & 1 deletion
2
force-app/main/default/lwc/stickySelectronDataCell/stickySelectronDataCell.js-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>54.0</apiVersion> | ||
<apiVersion>59.0</apiVersion> | ||
<isExposed>false</isExposed> | ||
</LightningComponentBundle> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
force-app/main/default/lwc/stickySelectronMain/stickySelectronMain.js-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
force-app/main/default/lwc/stickySelectronSelectCell/stickySelectronSelectCell.js-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>54.0</apiVersion> | ||
<apiVersion>59.0</apiVersion> | ||
<isExposed>false</isExposed> | ||
</LightningComponentBundle> |