+1 vote
48 views
by (163k points)

Here is my code

public with sharing class estimatevsPipeline {
    @AuraEnabled
    public static List<Opportunity> getestimatevsPipeline() {
        return [
            SELECT SUM(amount_ge_og__c) sumAmount
            FROM Opportunity
            WHERE
                ((IsClosed != TRUE
                AND ForecastCategoryName IN ('Commit', 'Commit at Risk'))
                OR StageName = 'Closed Won')
                AND RecordType.DeveloperName != 'Targets'
                AND Type IN ('Internal to GE Parent', 'Internal to BHGE', 'External')
                AND forecast_pipeline_exception_ge_og__c != TRUE
                AND CloseDate = THIS_QUARTER
                AND Id IN (
                    SELECT OpportunityId
                    FROM OpportunityTeamMember
                    WHERE
                        (UserId IN ('0051H000009S5D2QAK', '00512000007jB49AAE', '0051H00000Aw9VbQAJ')
                        OR UserId = '0051H00000AwEezQAF')
                        AND TeamMemberRole != 'Following'
                )
        ];
    }
}

1 Answer

Welcome to Memory Exceeded, where you can ask questions and receive answers from other members of the community.
...