diff --git a/README.md b/README.md index c1d8a3f..3a4d40f 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,8 @@ There are several repositories involved: - Create a fork of the template repository and use it as starting point in DevOps Center - Make sure to activate Actions, those aren't enabled by default when forking - Configure the Actions to use your own Orgs and Secrets - - `${{ secrets.INTEGRATION_SANDBOX_SFDX_URL}}` will be used to do test deployments and CSV Scan Report File Upload + - `${{ secrets.PROD_DEVOPS_CENTER_HOME_SFDX_URL }}` will be used to query DevOps Center records and create a package.xml file to do deployment validation with exactly the same metadata as DevOps Center would use. **Note:** Deleted components are not validated. + - `${{ secrets.INTEGRATION_SANDBOX_SFDX_URL }}` will be used to do test deployments and CSV Scan Report File Upload - GitHub Action workflows are configured to run when a PR against `integration` branch is opened - Please make sure the `integration` branch exists diff --git a/force-app/main/default/classes/AccountService.cls b/force-app/main/default/classes/AccountService.cls deleted file mode 100644 index 1625367..0000000 --- a/force-app/main/default/classes/AccountService.cls +++ /dev/null @@ -1,94 +0,0 @@ -/** - * AccountService Class - * Provides various services related to Account object - */ -public class AccountService { - /** - * Fetches details for a given account - * @param accountId The ID of the account - * @return Account The details of the account - */ - public Account getAccDetails(Id accountId) { - // SOQL query inside a loop - bad practice - for (Id accId : new List{ accountId }) { - Account acc = [SELECT Id, Name, Industry FROM Account WHERE Id = :accId]; - return acc; - } - return null; - } - - public Account getAccDetails2(Id accountId) { - // SOQL query inside a loop - bad practice - for (Id accId : new List{ accountId }) { - Account acc = [SELECT Id, Name, Industry FROM Account WHERE Id = :accId]; - update acc; - return acc; - } - return null; - } - - public Account getAccDetails3(Id accountId) { - // SOQL query inside a loop - bad practice - for (Id accId : new List{ accountId }) { - Account acc = [SELECT Id, Name, Industry FROM Account WHERE Id = :accId]; - update acc; - return acc; - } - return null; - } - - // This method lacks ApexDocs - public void UpdateAccount(List accounts) { - // DML operation inside a loop - bad practice - for (Account acc : accounts) { - acc.Name += ' - Updated'; - update acc; // This should be done in bulk outside the loop - } - } - - /** - * Deletes a specified account - * @param accountId The ID of the account to be deleted - */ - public void delete_Account(Id accountId) { - // Hardcoding IDs - bad practice - Id hardCodedId = '001xx000003DGAXAA4'; - delete [SELECT Id FROM Account WHERE Id = :hardCodedId]; - } - - // This method lacks ApexDocs - public List ListAccounts() { - // Not using bulkified approach - bad practice - List accounts = [SELECT Id, Name FROM Account LIMIT 1]; - return accounts; - } - - /** - * Calculates the annual revenue - * - This ApexDoc is incomplete and lacks parameter description - * @return Decimal The calculated annual revenue - */ - public String CalculateAnnualRevenue() { - // Lack of null checks and exception handling - bad practice - Account acc = [ - SELECT Industry - FROM Account - WHERE Id = '001xx000003DGAZAA4' - ]; - return acc.Industry; - } - - // This method lacks ApexDocs - public List ListAccounts2() { - // Not using bulkified approach - bad practice - List accounts = [SELECT Id, Name FROM Account LIMIT 1]; - return accounts; - } - - // This method lacks ApexDocs - public List ListAccounts3() { - // Not using bulkified approach - bad practice - List accounts = [SELECT Id, Name FROM Account LIMIT 1]; - return accounts; - } -} diff --git a/force-app/main/default/classes/AccountService.cls-meta.xml b/force-app/main/default/classes/AccountService.cls-meta.xml deleted file mode 100644 index c14e405..0000000 --- a/force-app/main/default/classes/AccountService.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 59.0 - Active - diff --git a/force-app/main/default/flexipages/Custom_Contact_Record_Page.flexipage-meta.xml b/force-app/main/default/flexipages/Custom_Contact_Record_Page.flexipage-meta.xml deleted file mode 100644 index 398ccc9..0000000 --- a/force-app/main/default/flexipages/Custom_Contact_Record_Page.flexipage-meta.xml +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - collapsed - false - - - enableActionsConfiguration - false - - - enableActionsInNative - false - - - hideChatterActions - false - - - numVisibleActions - 3 - - force:highlightsPanel - force_highlightsPanel - - - Replace - header - Region - - - - - - displayOption - BOTH - - runtime_sales_merge:mergeCandidatesPreviewCard - runtime_sales_merge_mergeCandidatesPreviewCard - - - - - - relatedListComponentOverride - NONE - - - rowsToDisplay - 10 - - - showActionBar - true - - force:relatedListContainer - force_relatedListContainer - - - Replace - relatedTabContent - Facet - - - - - force:detailPanel - force_detailPanel - - - Replace - detailTabContent - Facet - - - - - runtime_sales_social:socialPanel - runtime_sales_social_socialPanel - - - Replace - newsTabContent - Facet - - - - - - active - true - - - body - relatedTabContent - - - title - Standard.Tab.relatedLists - - flexipage:tab - relatedListsTab - - - - - - body - detailTabContent - - - title - Standard.Tab.detail - - flexipage:tab - detailTab - - - - - - body - newsTabContent - - - title - Standard.Tab.news - - flexipage:tab - newsTab - - - Replace - maintabs - Facet - - - - - - tabs - maintabs - - flexipage:tabset - flexipage_tabset - - - Replace - main - Region - - - - - - showLegacyActivityComposer - false - - runtime_sales_activities:activityPanel - runtime_sales_activities_activityPanel - - - Replace - sidebar - Region - - Contact Record Page - sfa__Contact_rec_L - Contact - - RecordPage - diff --git a/force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml b/force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml deleted file mode 100644 index 1de6964..0000000 --- a/force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml +++ /dev/null @@ -1,194 +0,0 @@ - - - 59.0 - - Account_is_VIP - - 50 - 815 - - GetAccount.IsVIP__c - Assign - - true - - - - UpdateAccountCheckbox - - - - ContactCountAssignment - - 314 - 575 - - NumberOfVIPContacts - AssignCount - - GetContacts - - - - Account_needs_update_if_VIP_Contacts - - - - IsNoVIP - - 314 - 815 - - GetAccount.IsVIP__c - Assign - - false - - - - UpdateAccountCheckbox - - - - Account_needs_update_if_VIP_Contacts - - 314 - 695 - Default Outcome - - AccountHasVIPContacts - and - - NumberOfVIPContacts - GreaterThan - - 0.0 - - - - Account_is_VIP - - - - - AccountHasNoVIPContacts - and - - NumberOfVIPContacts - EqualTo - - 0.0 - - - - IsNoVIP - - - - - Default - UpdateVIPStatus {!$Flow.CurrentDateTime} - - - BuilderType - - LightningFlowBuilder - - - - CanvasMode - - AUTO_LAYOUT_CANVAS - - - - OriginBuilderType - - LightningFlowBuilder - - - AutoLaunchedFlow - - GetAccount - - 314 - 455 - false - - ContactCountAssignment - - and - - Id - EqualTo - - $Record.AccountId - - - true - Account - true - - - GetContacts - - 314 - 335 - false - - GetAccount - - and - - IsVIP__c - EqualTo - - true - - - - AccountId - EqualTo - - $Record.Account.Id - - - false - Contact - true - - - UpdateAccountCheckbox - - 314 - 1031 - GetAccount - - - 188 - 0 - - GetContacts - - ISNEW() || ISCHANGED({!$Record.IsVIP__c}) - Contact - CreateAndUpdate - RecordAfterSave - - Active - - NumberOfVIPContacts - NumberOfVIPContacts - Number - false - false - false - 0 - - 0.0 - - - diff --git a/force-app/main/default/objects/Account/fields/IsVIP__c.field-meta.xml b/force-app/main/default/objects/Account/fields/IsVIP__c.field-meta.xml deleted file mode 100644 index 16dcc0f..0000000 --- a/force-app/main/default/objects/Account/fields/IsVIP__c.field-meta.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - IsVIP__c - false - VIP Accounts have special SLAs - false - - false - Checkbox - diff --git a/force-app/main/default/objects/Contact/fields/Faulty_Url_Field__c.field-meta.xml b/force-app/main/default/objects/Contact/fields/Faulty_Url_Field__c.field-meta.xml deleted file mode 100644 index 48114a2..0000000 --- a/force-app/main/default/objects/Contact/fields/Faulty_Url_Field__c.field-meta.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - Faulty_Url_Field__c - false - - false - false - Url - diff --git a/force-app/main/default/objects/Contact/fields/IsVIP__c.field-meta.xml b/force-app/main/default/objects/Contact/fields/IsVIP__c.field-meta.xml deleted file mode 100644 index 79ba7ac..0000000 --- a/force-app/main/default/objects/Contact/fields/IsVIP__c.field-meta.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - IsVIP__c - false - Will update Accounts VIP status - false - - false - Checkbox -