I'm posting this question previously but i'm not achieving my goal for that i posting again
I have a custom object called Incident__c. and it has some fields
- Imtpact__c
- Incident_state__c
- Short_description__c
- Contact_type__c
Note : all fields are check box fields
from visualforce page i'm saving Incident__c record
when i'm saving the record i checked only two fields and the remaining two fields are unchecked and i saved that record.
now my requiremt is i want two query only those checked two fields from the saved record
how can i achieve this
this is my apex class for saving the Incident records
public class DataInsert {
public Boolean impact {get;set;}
public Boolean incident_state {get;set;}
public Boolean short_description {get;set;}
public Boolean sys_id {get;set;}
public Boolean contact_type {get;set;}
public Boolean u_sftype {get;set;}
public Boolean sys_updated_onONLast {get;set;}
List<Incident__c> lst = new List<Incident__c>();
public PageReference doInsert() {
Incident__c objdlt = new Incident__c();
if(impact){
objdlt.impact__c=impact ;
}
if(incident_state){
objdlt.incident_state__c=incident_state;
}
if(short_description){
objdlt.short_description__c=short_description;
}
if(contact_type){
objdlt.contact_type__c=contact_type;
}
insert objdlt;
lst.add(objdlt);
}
}
Here suggest anyway to get the only checked fields from the saved Incident__c record.
Thanks In Advance