+ Start a Discussion
Mariappan PerumalMariappan Perumal 

Doubt on visualforce and apex

Hi everyone.

 

I have  requirement which is confusing me a lot.

 

I got the fieldset from 2 object( which is almost cloned one) and am putting that fields in 2 different list and processing that list and I have done the thing like passing the record from controller to vf page and processing but the situation i had is like processing inside controller itself and the code i have written ishere :

 

 

 public List<Schema.FieldSetMember> Fieldsconfig;

  public List<Schema.FieldSetMember> getFieldsconfig() {

       Fieldsconfig=SObjectType.Educationcenter__ApplicationConfig__c.FieldSets.Educationcenter__PersonalInformation.getFields();

       return null;

    }

  public List<Schema.FieldSetMember> PersonalinfoFields; 

  public List<Schema.FieldSetMember> getPersonalinfoFields() {

        PersonalinfoFields=SObjectType.Application__c.FieldSets.Educationcenter__PersonalInformation.getFields();

        return null;

    }

  public List<Schema.FieldSetMember> sampleFields;

  public List<Schema.FieldSetMember> getsampleFields()

  {

  for(Schema.FieldSetMember s:Fieldsconfig)

  {

  for(Schema.FieldSetMember sp:PersonalinfoFields)

  {

  if(a.sp==true)                     the error am getting is here ,.... compiler didn't mean to recognize this.

 

                                              actually a is querey record from sp object . 

  {

 sampleField.add(sp)

  }

 

  }

  }

 

  return sampleFields;

  }

 Can anyone help me out of this. Is there any other way to do the same .

 

Thanks in advance