• THARUN REDDY BOMMAREDDY
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Could anyone please let me know why I'm getting the error Invalid selectOptions found. Use SelectOption type in Apex during preview of the below visualforce page

public  class DynamicApex {
    public Map<String ,Schema.SObjectType> gd {set;get;}
    public List<String> objlist {set;get;}
    public List<SelectOption> sop {set;get;}
    public  DynamicApex() 
    {
        objlist=new List<String>();
        sop=new List<SelectOption>();
        gd= Schema.getGlobalDescribe();
        objlist.addAll(gd.keyset());
        objlist.sort();
        System.debug(objlist);
        for(String s: objlist)
        {
            SelectOption sa= new SelectOption(s,s);
            sop.add(sa);

        }    }}

<apex:page controller="DynamicApex">
<apex:form>
  <apex:pageBlock>
    <apex:pageBlockSection>
      <apex:pageBlockSectionItem>
         <apex:outputLabel value="Select Object"/>
         <apex:selectList size="1">
            <apex:selectOptions value="{!objlist}"/>
         </apex:selectList>
      </apex:pageBlockSectionItem>
    </apex:pageBlockSection>
  </apex:pageBlock>
</apex:form>      
</apex:page>
Hello,

I'm having a process builder that is getting called even though when the corresponding object record in not created or edited. In this case it got invoked on the object when it's not edited . I checked the last modified date on the record and it's way past. Is there a way to check what made the process builder to invoke on the record?
Could anyone please let me know why I'm getting the error Invalid selectOptions found. Use SelectOption type in Apex during preview of the below visualforce page

public  class DynamicApex {
    public Map<String ,Schema.SObjectType> gd {set;get;}
    public List<String> objlist {set;get;}
    public List<SelectOption> sop {set;get;}
    public  DynamicApex() 
    {
        objlist=new List<String>();
        sop=new List<SelectOption>();
        gd= Schema.getGlobalDescribe();
        objlist.addAll(gd.keyset());
        objlist.sort();
        System.debug(objlist);
        for(String s: objlist)
        {
            SelectOption sa= new SelectOption(s,s);
            sop.add(sa);

        }    }}

<apex:page controller="DynamicApex">
<apex:form>
  <apex:pageBlock>
    <apex:pageBlockSection>
      <apex:pageBlockSectionItem>
         <apex:outputLabel value="Select Object"/>
         <apex:selectList size="1">
            <apex:selectOptions value="{!objlist}"/>
         </apex:selectList>
      </apex:pageBlockSectionItem>
    </apex:pageBlockSection>
  </apex:pageBlock>
</apex:form>      
</apex:page>