Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
607e520
Add Metadata Deployment Utilities
bobbysfdev Oct 31, 2023
3c96d8e
First build of indicator builder
fromsteinsfdc Oct 31, 2023
d6ccbcd
Add Indicator Edit Modal (This modal will be used for all editing it …
bobbysfdev Oct 31, 2023
3b74080
Add editIndicatorBundle LWC this is the primary lwc that will be used…
bobbysfdev Oct 31, 2023
2639835
Update configuration Manager component to call indicator edit modal u…
bobbysfdev Oct 31, 2023
5321bfb
Added CSS line to change utility icon foreground
fromsteinsfdc Oct 31, 2023
f35ab43
Adding objectFieldSelector
fromsteinsfdc Oct 31, 2023
73e5f78
Merge adbecc3fb6066792b63b8dc0ad3ca94003e0aa52 into feature/indicator…
github-actions[bot] Dec 20, 2023
b4797b0
Merge adbecc3fb6066792b63b8dc0ad3ca94003e0aa52 into feature/metadata-…
github-actions[bot] Dec 20, 2023
2e06640
Merge 02c80a083513f9fc273c8dce6df7dff20fae6926 into feature/metadata-…
github-actions[bot] Jan 5, 2024
7f409ae
Merge 4d620fc058210458a6d963dca633393d82d5979c into feature/metadata-…
github-actions[bot] Jan 9, 2024
a58a947
Merge b863af46f867b6bda1719631ee94437a09123eda into feature/metadata-…
github-actions[bot] Jan 10, 2024
b582ab5
Merge c5f39d8719dd4205ef2799884992e0aa270e9c1c into feature/metadata-…
github-actions[bot] Jan 31, 2024
f20dc7e
Merge 29d42907cef28713ad088b8f4884cb9ed6f0b864 into feature/metadata-…
github-actions[bot] Feb 2, 2024
45fefea
Add Delete__c field to all Custom metadata types.
bobbysfdev Feb 6, 2024
4648eb1
Refactor metadata deploy methods, incorporating deployment wrapper, t…
bobbysfdev Feb 6, 2024
be06f41
Update SOQL queries with DeveloperName, Label, and QualifiedApiName f…
bobbysfdev Feb 7, 2024
a829e85
First build of indicator builder
fromsteinsfdc Oct 31, 2023
a524b32
Added CSS line to change utility icon foreground
fromsteinsfdc Oct 31, 2023
e96a508
Adding objectFieldSelector
fromsteinsfdc Oct 31, 2023
fe935ce
Changes to fieldSelector and objectFieldSelector. Added indicatorStyl…
fromsteinsfdc Feb 7, 2024
37c90ea
Trying to merge?
fromsteinsfdc Feb 7, 2024
7632d03
Merge 94563a537372e2d82ac1171dc4da63aa7e773455 into feature/indicator…
github-actions[bot] Apr 30, 2024
93db19a
Starting point for Sprint Sept 2024
fromsteinsfdc Sep 26, 2024
cce2437
Cleaning up code
fromsteinsfdc Sep 26, 2024
e3fbad6
Adding tab with Indicator Builder component
fromsteinsfdc Sep 26, 2024
7670660
Added "includeFullDetails" to combobox and objectFieldSelector compon…
fromsteinsfdc Sep 26, 2024
e793a7a
SLDS Icon Static Resource CSV
tschug Sep 26, 2024
f10020b
Merge branch 'feature/indicator-builder' of https://github.com/SFDO-C…
tschug Sep 26, 2024
5621d5e
Progress on field-based logic
fromsteinsfdc Sep 27, 2024
4bd58d6
First draft of breaking out extension into child component
fromsteinsfdc Sep 27, 2024
8c4fca1
Working version of indicatorBuilderExtension
fromsteinsfdc Sep 27, 2024
b2af5c0
Sept Sprint Update
bobbysfdev Sep 27, 2024
57fd1b3
Merge 47245d12555bc191d48730d5dfdecef4ebe693b6 into feature/indicator…
github-actions[bot] Oct 8, 2024
c6c7a0b
FSC merge
bobbysfdev Nov 13, 2024
c919609
change indicator builder
bobbysfdev Nov 13, 2024
ef006fa
Merge branch 'feature/metadata-deploy' into feature/indicator-builder
thombehrens Nov 13, 2024
4f911d1
Merge pull request #182 from SFDO-Community/feature/indicator-builder
thombehrens Nov 13, 2024
7c140f4
stub of new modal for bundle
thombehrens Nov 14, 2024
e276b39
Insert new Bundle from modal ✅
thombehrens Nov 14, 2024
339db6e
picklist for budle sobject selection
thombehrens Nov 14, 2024
e7e455f
update key.html to open correct modal on button click
thombehrens Nov 14, 2024
c806ae5
Merge branch 'main' into feature/metadata-deploy-bundle-modal
thepaulfox Nov 14, 2025
3f5df6d
Add indicatorlistitem elements back
thepaulfox Nov 14, 2025
2e6536f
Fix for icon not appearing
thepaulfox Nov 14, 2025
c216f6a
Update apex class to work for mac developers
thepaulfox Nov 14, 2025
c4770a0
Fix relationship handling in metadata utility so you can save item ex…
thepaulfox Nov 14, 2025
488e083
Add agent astro to icons. This one was missing, which indicates this …
thepaulfox Nov 14, 2025
657ffc2
Remove button to open indicator item extension since edit indicator c…
thepaulfox Nov 14, 2025
36d2a38
Add ability to save item extensions. This version does not yet suppor…
thepaulfox Nov 14, 2025
e10fc58
Edit bundle
thepaulfox Nov 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
146 changes: 76 additions & 70 deletions force-app/main/default/classes/Cmdt.cls
Original file line number Diff line number Diff line change
Expand Up @@ -5,91 +5,97 @@ public with sharing class Cmdt {

// Gather all active Bundles and put them into a Map (key: DeveloperName; Bundle)
for( Indicator_Bundle__mdt bundle : [
SELECT Id, DeveloperName, MasterLabel, Label,
Active__c,
Card_Icon__c,
Card_Icon_Background__c,
Card_Icon_Foreground__c,
Card_Text__c,
Card_Title__c,
Description__c,
sObject__c,
sObject__r.QualifiedApiName,
sObject__r.Label
FROM Indicator_Bundle__mdt
ORDER BY Label
SELECT Id, DeveloperName, MasterLabel, Label, QualifiedApiName,
Active__c,
Card_Icon__c,
Card_Icon_Background__c,
Card_Icon_Foreground__c,
Card_Text__c,
Card_Title__c,
Description__c,
sObject__c,
sObject__r.QualifiedApiName,
sObject__r.Label
FROM Indicator_Bundle__mdt
WHERE Delete__c != TRUE
] ) {
setBundle(bundle);
}

// Gather all active Items and put them into a Map (key: Developername; Item)
// Using SOQL because of parent-related values AND Advanced_Field__c is long text.
for( Indicator_Item__mdt item : [
SELECT Id, DeveloperName, MasterLabel,
Active__c,
Advanced_Field__c,
Advanced_Field_Label__c,
Display_Multiple__c,
Empty_Static_Text_Behavior__c,
Field__c, Field__r.QualifiedApiName,
Hover_Text__c,
Icon_Value__c,
Image__c,
Inverse_Hover_Text__c,
Inverse_Icon_Value__c,
Inverse_Image__c,
Inverse_Static_Text__c,
Show_False_or_Blank__c,
sObject__c, sObject__r.QualifiedApiName,
Static_Text__c,
Zero_Behavior__c,
Icon_Background__c,
Icon_Foreground__c,
Inverse_Icon_Background__c,
Inverse_Icon_Foreground__c,
Description__c
FROM Indicator_Item__mdt
// WHERE Active__c = TRUE
SELECT Id, DeveloperName, MasterLabel, Label, QualifiedApiName,
Active__c,
Advanced_Field__c,
Advanced_Field_Label__c,
Display_Multiple__c,
Empty_Static_Text_Behavior__c,
Field__c, Field__r.QualifiedApiName,
Hover_Text__c,
Icon_Value__c,
Image__c,
Inverse_Hover_Text__c,
Inverse_Icon_Value__c,
Inverse_Image__c,
Inverse_Static_Text__c,
Show_False_or_Blank__c,
sObject__c, sObject__r.QualifiedApiName,
Static_Text__c,
Zero_Behavior__c,
Icon_Background__c,
Icon_Foreground__c,
Inverse_Icon_Background__c,
Inverse_Icon_Foreground__c,
Description__c
FROM Indicator_Item__mdt
WHERE Delete__c != TRUE
// WHERE Active__c = TRUE
]){
setItem(item);
}

// Gather all active Bundle Items (Bundle and Item are active) and put them into a Map (key: Bundle DeveloperName; List of BundleItems)
// Using SOQL because of the Order By clause rather than creating a custom sort method.
for( Indicator_Bundle_Item__mdt bundleItem : [
SELECT Indicator_Bundle__c, Indicator_Bundle__r.DeveloperName,
Indicator_Item__c, Indicator_Item__r.DeveloperName,
Order__c
FROM Indicator_Bundle_Item__mdt
// WHERE Indicator_Bundle__r.Active__c = TRUE
// AND Indicator_Item__r.Active__c = TRUE
ORDER BY Order__c
SELECT Id, DeveloperName, QualifiedApiName, MasterLabel, Label,
Indicator_Bundle__c, Indicator_Bundle__r.DeveloperName, Indicator_Bundle__r.QualifiedApiName,
Indicator_Item__c, Indicator_Item__r.DeveloperName, Indicator_Item__r.QualifiedApiName,
Order__c
FROM Indicator_Bundle_Item__mdt
WHERE Delete__c != TRUE
// WHERE Indicator_Bundle__r.Active__c = TRUE
// AND Indicator_Item__r.Active__c = TRUE
ORDER BY Order__c
]){
setBundleItem(bundleItem);
}

// Gather all active Item Extensions and put them into a Map (key: Indicator Item; List of Extensions)
// Using SOQL because of the Order By clause rather than creating a custom sort method.
for(Indicator_Item_Extension__mdt itemExtension : [
SELECT Id, Active__c,
Contains_Text__c,
Text_Operator__c,
Hover_Text__c,
Icon_Value__c,
Image__c,
Indicator_Item__c,
Indicator_Item__r.DeveloperName,
Maximum__c,
Minimum__c,
Priority__c,
Static_Text__c,
Icon_Background__c,
Icon_Foreground__c,
Description__c
FROM Indicator_Item_Extension__mdt
// WHERE Active__c = TRUE
// AND Indicator_Item__r.Active__c = TRUE
ORDER BY Indicator_Item__c, Priority__c DESC, MasterLabel
SELECT Id, DeveloperName, QualifiedApiName, Label, MasterLabel,
Active__c,
Contains_Text__c,
Text_Operator__c,
Hover_Text__c,
Icon_Value__c,
Image__c,
Indicator_Item__c,
Indicator_Item__r.DeveloperName,
Indicator_Item__r.QualifiedApiName,
Maximum__c,
Minimum__c,
Priority__c,
Static_Text__c,
Icon_Background__c,
Icon_Foreground__c,
Description__c
FROM Indicator_Item_Extension__mdt
WHERE Delete__c != TRUE
// WHERE Active__c = TRUE
// AND Indicator_Item__r.Active__c = TRUE
ORDER BY Indicator_Item__c, Priority__c DESC, MasterLabel
]){
setItemExtension(itemExtension);
}
Expand Down Expand Up @@ -144,7 +150,7 @@ public with sharing class Cmdt {
}

public static List<Indicator_Item__mdt> getAllOrphanItems(){

List<Indicator_Item__mdt> orphanItems = new List<Indicator_Item__mdt>();

for(String itemName : itemsByName.keyset()){
Expand All @@ -160,28 +166,28 @@ public with sharing class Cmdt {
if(bundlesByName.containsKey(bundleDevName))
return bundlesByName.get(bundleDevName);
else
return new Indicator_Bundle__mdt();
return new Indicator_Bundle__mdt();
}

public static Indicator_Item__mdt getItem(String itemDevName){
if(itemsByName.containsKey(itemDevName))
return itemsByName.get(itemDevName);
else
return new Indicator_Item__mdt();
return new Indicator_Item__mdt();
}

public static List<Indicator_Bundle_Item__mdt> getBundleItems(String bundleDevName){
if(bundleItemsByBundle.containsKey(bundleDevname))
return bundleItemsByBundle.get(bundleDevName);
else
return new List<Indicator_Bundle_Item__mdt>();
else
return new List<Indicator_Bundle_Item__mdt>();
}

public static List<Indicator_Item_Extension__mdt> getExtensionsForItem(String itemDevName){
if(extensionsByItem.containsKey(itemDevName))
return extensionsByItem.get(itemDevName);
else
return new List<Indicator_Item_Extension__mdt>();
return new List<Indicator_Item_Extension__mdt>();
}

// Static variables used across methods.
Expand Down
5 changes: 5 additions & 0 deletions force-app/main/default/classes/IndicatorController.cls
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,9 @@ public with sharing class IndicatorController {
return wrapper;
}

@AuraEnabled(Cacheable=true)
public static MetadataUtility.indicatorBundle getIndicatorBundleWrapper(String QualifiedApiName) {
return new MetadataUtility.indicatorBundle(QualifiedApiName);
}

}
23 changes: 23 additions & 0 deletions force-app/main/default/classes/MetadataDeploy.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Created by robertwright on 10/30/23.
*/

public with sharing class MetadataDeploy implements Metadata.DeployCallback {

public String resultMessage;

public void handleResult(Metadata.DeployResult result,Metadata.DeployCallbackContext context) {
if(result.status === Metadata.DeployStatus.Succeeded) {
resultMessage = 'MetaData Deploy Succeeded';
} else resultMessage = 'MetaData Deploy Failed';
if(Test.isRunningTest()) System.debug(resultMessage);
}

public static Id upsertMetaData(Metadata.DeployContainer deployContainer) {
MetadataDeploy callback = new MetadataDeploy();
Id upsertId;
if(!Test.isRunningTest()) upsertId = Metadata.Operations.enqueueDeployment(deployContainer,callback);
return upsertId;
}

}
5 changes: 5 additions & 0 deletions force-app/main/default/classes/MetadataDeploy.cls-meta.xml
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>58.0</apiVersion>
<status>Active</status>
</ApexClass>
10 changes: 10 additions & 0 deletions force-app/main/default/classes/MetadataDeployTests.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Created by robertwright on 10/30/23.
*/

@IsTest
private class MetadataDeployTests {
@IsTest
static void testBehavior() {
}
}
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>58.0</apiVersion>
<status>Active</status>
</ApexClass>
Loading