Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some new Apex code #1

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sylvain-combe-sonarsource
Copy link
Contributor

No description provided.

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
54 New issues
5 Security Hotspots

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

Database.SaveResult[] householdSaveResults) {
List<Contact> contactsToBeUpdatedWithHouseholdId =
getContactsToBeUpdatedWithNewHouseholdId(contacts, householdSaveResults);
update contactsToBeUpdatedWithHouseholdId;

Check warning

Code scanning / SonarQube

Apex CRUDViolation Medium

Validate CRUD permission before SOQL/DML operation See more on SonarQube
}

if (!accountsToUpdate.isEmpty()) {
update accountsToUpdate; // Update member count

Check warning

Code scanning / SonarQube

Apex CRUDViolation Medium

Validate CRUD permission before SOQL/DML operation See more on SonarQube
Comment on lines +542 to +549
return [
SELECT Id, npe01__One2OneContact__c,
npe01__SYSTEM_AccountType__c,
Number_of_Household_Members__c,
(SELECT Id FROM Contacts)
FROM Account
WHERE npe01__One2OneContact__c IN :contactIds
];

Check warning

Code scanning / SonarQube

Apex CRUDViolation Medium

Validate CRUD permission before SOQL/DML operation See more on SonarQube
Comment on lines +79 to +85
for (OpportunityContactRole role : [
SELECT ContactId, OpportunityId, Opportunity.AccountId
FROM OpportunityContactRole
WHERE IsPrimary = TRUE
AND Opportunity.AccountId IN :oldHouseholdIdByContactId.values()
AND ContactId IN :newHouseholdIdByContactId.keySet()
]) {

Check warning

Code scanning / SonarQube

Apex CRUDViolation Medium

Validate CRUD permission before SOQL/DML operation See more on SonarQube
Comment on lines +263 to +269
return [
SELECT Id, Name, npo02__SYSTEM_CUSTOM_NAMING__c, npo02__Formal_Greeting__c,
npo02__Informal_Greeting__c, Number_of_Household_Members__c,
All_Members_Deceased__c
FROM Account
WHERE Id IN :hhids
];

Check warning

Code scanning / SonarQube

Apex CRUDViolation Medium

Validate CRUD permission before SOQL/DML operation See more on SonarQube
Comment on lines +542 to +549
return [
SELECT Id, npe01__One2OneContact__c,
npe01__SYSTEM_AccountType__c,
Number_of_Household_Members__c,
(SELECT Id FROM Contacts)
FROM Account
WHERE npe01__One2OneContact__c IN :contactIds
];

Check warning

Code scanning / SonarQube

Apex CRUDViolation Medium

Validate CRUD permission before SOQL/DML operation See more on SonarQube
Comment on lines +273 to +278
return [
SELECT Id, Name, npo02__SYSTEM_CUSTOM_NAMING__c, npo02__Formal_Greeting__c,
npo02__Informal_Greeting__c, Number_of_Household_Members__c
FROM Npo02__Household__c
WHERE Id IN :hhids
];

Check warning

Code scanning / SonarQube

Apex CRUDViolation Medium

Validate CRUD permission before SOQL/DML operation See more on SonarQube
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants