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

Update CandidateGradeController.cls #394

Open
wants to merge 1 commit into
base: master-waf
Choose a base branch
from
Open

Conversation

Gabriele-Clayton
Copy link
Contributor

No description provided.

Copy link

@clayton-staging clayton-staging bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review not passed

This is the summary of issues introduced by this change:

Policy name Issues
Secure 0
Compliant 0
Intentional 0
Automated 0
Reliable 1
Engaging 0
Resilient 0
Composable 0

See the full report to learn more.

@clayton-staging clayton-staging bot dismissed their stale review June 3, 2024 12:16

This code review is obsolete

Copy link

@clayton-staging clayton-staging bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review not passed

This is the summary of issues introduced by this change:

Policy name Issues
Resilient 0
Intentional 0
Composable 0
Engaging 0
Automated 0
Secure 0
Compliant 0
Reliable 1

See the full report to learn more.

@@ -26,6 +26,10 @@ for (int i = 0; i < 5; i++) {
Contact currentContacti = [SELECT Name, Salary__c, NextAvailableDate__c FROM Contact where Id = :contactId];
}

for (int j = 0; j < 5; j++) {
Contact currentContactj = [SELECT Name, Salary__c, NextAvailableDate__c FROM Contact where Id = :contactId];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reliable: Data access in loop

Severity

Error

Finding

This data query is inside a loop. Please move the query outside the loop and put records in collections for processing.

Why is this a problem?

Salesforce enforce a limit on the number of SOSL and DML statements per transaction. Reading or writing data inside loops is highly likely to hit such limits.

Help and documentation

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.

1 participant