- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
06-17-2009 01:59 PM
I am very new to Apex Development. I am trying to accomplish this:
I have 1 custom object: ScoringRule__c and its fields are leadName__c, operator1__c, operator2__c, val1__c, val2__c, score__c
leadName__c stores the field name of the lead (Annual Revenue/No.OfEmployees etc.)
operator1__c and operator2__c stores the operater (greater than, less than etc.)
Va1_c and Val2_c store the values (any number).
In english, it would appear like this:
If the Annual revenue is greater than 0 and less than 100, give it a score of A.
I want to write a query that takes the lead object and gives me all leads that will have revenue between 0 to 100.
Can i do that? Can anyone please help me out?