-
I've got a date variable that's initialised like so: DateTime sevenDaysAgo = System.now().addDays(-7); This is then used in a where clause:
The scanner flags this as a problem: "Null check is missing for variable sevenDaysAgo used in SOQL query." Of course I can, and will swap this out for |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes see here: https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/working-with-graph-engine.html (under "Add Engine Directives") |
Beta Was this translation helpful? Give feedback.
-
Ah thanks, will give that a go. |
Beta Was this translation helpful? Give feedback.
Yes see here: https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/working-with-graph-engine.html (under "Add Engine Directives")