You need to sign in to do that
Don't have an account?
I need to add sobject values in my wrapper class
public class OppWrapper
{
public String EventName {get;set;}
public String RecordId {get;set;}
public String RecordName {get;set;}
public String RecordStage {get;set;}
public String StandNo {get;set;}
public String BannerName {get;set;}
public OppWrapper(String EventName,String RecordId,String RecordName,String RecordStage,String StandNo,String BannerName)
{
this.EventName =EventName;
this.RecordId =RecordId;
this.RecordName =RecordName;
this.RecordStage=RecordStage;
this.StandNo=StandNo;
this.BannerName=BannerName;
}
}
i am having this wrapper class now i need to add my sObject values in this wrapper class
public class Post_Records {
Public static void Insert_Records(){
List<Opportunity_Prod_Batch_Record__c> oppbatch=[select Edition_Name__c,Opportunity_Id__c,Opportunity_Name__c,Opportunity_Stage__c,Stand_No__c,Banner_name__c
from Opportunity_Prod_Batch_Record__c ];
List<Floor_Plan_Mapping__c> LstFlrmapping=new list< Floor_Plan_Mapping__c>();
LstFlrmapping=[select Id, Edition__c,Object__c,Opportunity__c,Opportunity_Id__c,Stage__c,Banner_Name__c,Stand_no__c,Edition_Event_Name__c from Floor_Plan_Mapping__c order by createdDate DESC limit 1];
String query= 'select ID,'+LstFlrmapping[0].Edition__c+','+LstFlrmapping[0].Opportunity__c+','+LstFlrmapping[0].Opportunity_Id__c+','+LstFlrmapping[0].Stage__c+','+LstFlrmapping[0].Banner_Name__c +','+LstFlrmapping[0].Stand_no__c +' from '+LstFlrmapping[0].Object__c+' where '+LstFlrmapping[0].Edition__c+' = \''+LstFlrmapping[0].Edition_Event_Name__c +'\'';
String Edition=LstFlrmapping[0].Edition__c;
String Opportunity=LstFlrmapping[0].Opportunity__c;
String OpprtunityId=LstFlrmapping[0].Opportunity_Id__c;
String Objects=LstFlrmapping[0].Object__c;
String stage=LstFlrmapping[0].Stage__c;
String BannerName=LstFlrmapping[0].Banner_Name__c;
String StandNo=LstFlrmapping[0].Stand_no__c;
System.debug('Query formed----> '+query);
List<sObject> sc= Database.query(query);
System.debug('All Records -->'+sc);
}
now i need to add sobejct values in my wrapper class please help me it is urgent
All Answers
actually i need to POST the records in THird party api currently i am able to fecth the all the records which i wants but stcuk in posting the records
can you please help me....
@Raj Vakati
many thanks to you now i am able to run class sucessfully using your provided method and post the data sucesfully in third party api
now i need convert this class in batch class can it be possible?
sir u there i need one more favour from you
@Raj Vakati
sir plese chehk this post
https://developer.salesforce.com/forums/ForumsMain?id=9062I000000g9UYQAY#!/feedtype=SINGLE_QUESTION_DETAIL&dc=Apex_Code_Development&criteria=OPENQUESTIONS&id=9062I000000g9boQAA