• Sharath-learner
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

Integer repeat=4;
        while(repeat!=0)
        {
            if(repeat==0)
            {
            break;
            }
            else
            {   
            Integer nextCount =[select COUNT() from Account where Batch_Queue__c = true];
             if(nextCount!=0)    
                {
                sendNotification('Account');
                }
            }   
        repeat--;    
        }

 

and send Notification contains only 4 SOQL queries not with in for loops.

But i'm getting this exception...

 

 

Please help

Hi my class is below

 

 

public class SendEmailToCandidates {
    
    public String positionSelected{get; set;}
    //get Positions
    public List<SelectOption> getPositionList()
    {
    List<Selectoption> optns=new List<Selectoption>();       
    List<Position__c> position=[select name,id from Position__c];
            
                for(Position__c pos:position)
                {
                   optns.add(new Selectoption(pos.name,pos.name));
                }   
    System.debug(position);
    return optns;
    
    }

  //constructor
    public SendEmailToCandidates()
    {
    applicantsList=new List<Job_Application__c>();
    positionList=new Position__c();
    }

}

i'm populating positions

but i' m not able to get the positons in the drop down

 

my page is

 

<apex:page controller="SendEmailToCandidates">
<apex:form >
<apex:selectList value="{!positionSelected}" >
<apex:selectOptions value="{!positionList}" >
</apex:selectOptions>
</apex:selectList>
</apex:form>

<apex:page>

 

error is:
Invalid selectOptions found. Use SelectOption type in Apex.

Help me

Hi my class is below

 

 

public class SendEmailToCandidates {
    
    public String positionSelected{get; set;}
    //get Positions
    public List<SelectOption> getPositionList()
    {
    List<Selectoption> optns=new List<Selectoption>();       
    List<Position__c> position=[select name,id from Position__c];
            
                for(Position__c pos:position)
                {
                   optns.add(new Selectoption(pos.name,pos.name));
                }   
    System.debug(position);
    return optns;
    
    }

  //constructor
    public SendEmailToCandidates()
    {
    applicantsList=new List<Job_Application__c>();
    positionList=new Position__c();
    }

}

i'm populating positions

but i' m not able to get the positons in the drop down

 

my page is

 

<apex:page controller="SendEmailToCandidates">
<apex:form >
<apex:selectList value="{!positionSelected}" >
<apex:selectOptions value="{!positionList}" >
</apex:selectOptions>
</apex:selectList>
</apex:form>

<apex:page>

 

error is:
Invalid selectOptions found. Use SelectOption type in Apex.

Help me