PDII · Question #304
As part of a new integration, a developer is asked to implement a new custom search functionality that is capable of performing unrestricted queries and can account for all values within a custom…
The correct answer is D. Create a formula field that substitutes NULL values for a string of text, create an index for the. See the full explanation below for the reasoning.
Question
As part of a new integration, a developer is asked to implement a new custom search functionality that is capable of performing unrestricted queries and can account for all values within a custom picklist field, Type__c, on the Opportunity object. The search feature must also account for NULL values. The organization-wide default for the Opportunity object is set to Public Read-Only, and a new custom index has been created for the Type__c field. There are more than 5 million Opportunity records within the environment, and a considerable amount of the existing records have NULL values for the picklist. Which technique should the developer implement to maximize performance when querying NULL values?
Options
- AUse a SOSL query to return ALL opportunities that have a value of NULL in any field.
- BUse the OR operator to combine WHERE clauses to strictly search for each value within the
- CPerform two SOQL queries; one to query Opportunities where Type__c != NULL, and another to
- DCreate a formula field that substitutes NULL values for a string of text, create an index for the
How the community answered
(19 responses)- A5% (1)
- B5% (1)
- C16% (3)
- D74% (14)
Community Discussion
No community discussion yet for this question.