• Iqra Tech
  • NEWBIE
  • 85 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 27
    Questions
  • 121
    Replies
public class My_2nd_Api {
    
    Public static void Insert_Records(){
   
        
List<Opportunity> oppbatch=[select id,name,stageName, Edition__r.name,                          
                            (select id, name from OpportunityLineItems  ), 
                            (Select contact.firstname,contact.lastname,contact.Email,contact.Phone,contact.Salutation,contact.title  from OpportunityContactRoles) 
                           from Opportunity where Edition__r.name ='FM EXPO 2017' AND  HasOpportunityLineItem = true ];
                            
        system.debug('oppbatch List query.. '+oppbatch);
        
List<OppWrapper> oppWrapperVarList = new List<OppWrapper>();
for(Opportunity opp : oppbatch) 
{
 system.debug('Chehking'+opp.OpportunityLineItems);
 OppWrapper oppwrappervar = new OppWrapper(opp.id,opp.name,opp.StageName,opp.Edition__r.name,                                        
                                                                                  
                                           null, null, null, null, null); 

    
    for(OpportunityLineItem li : opp.OpportunityLineItems)
    {    
        oppwrappervar.SFDC_Record_Unique_ID=li.id;
        oppwrappervar.Product_Name=li.name;
              
    }
   for(OpportunityContactRole ocr : opp.OpportunityContactRoles)
    {
        oppwrappervar.First_Name = ocr.contact.firstname;
        oppwrappervar.Last_Name =ocr.contact.lastname ;
        oppwrappervar.Email=ocr.contact.Email;
        oppwrappervar.Mobile=ocr.contact.Phone;
        oppwrappervar.Salutation=ocr.contact.Salutation;
        oppwrappervar.Job_Title=ocr.contact.title;        
    }
    
oppWrapperVarList.add(oppwrappervar);
}
 string jsonbody=Json.serialize(oppWrapperVarList);
        system.debug('Json body---->'+jsonbody);
        
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        //request.setEndpoint('http://fpdatamap.salesforceoutsourcing.in/api/FPDatas');
        request.setEndpoint('http://sfdata.iqratechnology.com/api/fs_metadata');

        request.setMethod('POST');
        request.setHeader('Content-Type','application/json');
        //request.setHeader('Content-Type','multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
        //request.setHeader('Authorization','Bearer '+ AuthorizationToken);
//request.setBody('[{ "RecordId": "456","RecordName": "moosa traders pvt ltd / The Big 5 Construct Egypt 2018 /  / 093061123", "EventName": "a2JD0000001ns6uMAA U", "RecordStage": "Test Stage Amjad","BannerName": "Test Banner Amjad","StandNo": "Test Stand Amjad"}]');
        request.setBody(jsonbody);
        
       HttpResponse response = http.send(request);
        system.debug('Response body '+ response.getBody());
if (response.getStatusCode() != 201) {
    System.debug('The status code returned was not expected: ' +
        response.getStatusCode() + ' ' + response.getStatus());
} else {
    System.debug(response.getBody());
}
        
        
    }
    
    Public class OppWrapper
    {
        public String SFDC_RecordID {get;set;}
        public String SFDC_RecordName {get;set;}
        public String SFDC_RecordStage {get;set;}
        public String SFDC_EventName {get;set;}       
        public String SFDC_Record_Unique_ID {get;set;}
        public String Product_Name {get;set;}       
        public String First_Name {get;set;}
        public String Last_Name {get;set;}
        public String Email {get;set;}
        public String Mobile {get;set;}
        public String Salutation {get;set;}
        public String Job_Title {get;set;}     
        
       
        
        public OppWrapper(String SFDC_RecordID,String SFDC_RecordName,String SFDC_RecordStage,String SFDC_EventName,
                          String SFDC_Record_Unique_ID,String Product_Name,String First_Name,String Last_Name,String Email,String Mobile,String Salutation,
                          String Job_Title)
        {
            this.SFDC_RecordID =SFDC_RecordID;
            this.SFDC_RecordName =SFDC_RecordName;
            this.SFDC_RecordStage =SFDC_RecordStage;
            this.SFDC_EventName=SFDC_EventName;           
            this.SFDC_Record_Unique_ID=SFDC_Record_Unique_ID;
            this.Product_Name=Product_Name;          
            this.First_Name=First_Name;
            this.Last_Name=Last_Name;
            this.Email=Email;
            this.Mobile=Mobile;
            this.Salutation=Salutation;
            this.Job_Title=Job_Title;
            
            
        }
    }
    
}

i have created this class for posting the data in third party API but facing governer limits now i need to convert this class into the batch class can any one please help me to achive this requiremnt need urgent please help...........
public class My_2nd_Api {
    
    Public static void Insert_Records(){
   
        
List<Opportunity> oppbatch=[select id,name,stageName, Edition__r.name,                          
                            (select id, name from OpportunityLineItems  ), 
                            (Select contact.firstname,contact.lastname,contact.Email,contact.Phone,contact.Salutation,contact.title  from OpportunityContactRoles) 
                           from Opportunity where Edition__r.name ='FM EXPO 2017' AND  HasOpportunityLineItem = true ];
                            
        system.debug('oppbatch List query.. '+oppbatch);
        
List<OppWrapper> oppWrapperVarList = new List<OppWrapper>();
for(Opportunity opp : oppbatch) 
{
 system.debug('Chehking'+opp.OpportunityLineItems);
 OppWrapper oppwrappervar = new OppWrapper(opp.id,opp.name,opp.StageName,opp.Edition__r.name,                                        
                                                                                  
                                           null, null, null, null, null); 

    
    for(OpportunityLineItem li : opp.OpportunityLineItems)
    {    
        oppwrappervar.SFDC_Record_Unique_ID=li.id;
        oppwrappervar.Product_Name=li.name;
              
    }
   for(OpportunityContactRole ocr : opp.OpportunityContactRoles)
    {
        oppwrappervar.First_Name = ocr.contact.firstname;
        oppwrappervar.Last_Name =ocr.contact.lastname ;
        oppwrappervar.Email=ocr.contact.Email;
        oppwrappervar.Mobile=ocr.contact.Phone;
        oppwrappervar.Salutation=ocr.contact.Salutation;
        oppwrappervar.Job_Title=ocr.contact.title;        
    }
    
oppWrapperVarList.add(oppwrappervar);
}
 string jsonbody=Json.serialize(oppWrapperVarList);
        system.debug('Json body---->'+jsonbody);
        
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        //request.setEndpoint('http://fpdatamap.salesforceoutsourcing.in/api/FPDatas');
        request.setEndpoint('http://sfdata.iqratechnology.com/api/fs_metadata');

        request.setMethod('POST');
        request.setHeader('Content-Type','application/json');
        //request.setHeader('Content-Type','multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
        //request.setHeader('Authorization','Bearer '+ AuthorizationToken);
//request.setBody('[{ "RecordId": "456","RecordName": "moosa traders pvt ltd / The Big 5 Construct Egypt 2018 /  / 093061123", "EventName": "a2JD0000001ns6uMAA U", "RecordStage": "Test Stage Amjad","BannerName": "Test Banner Amjad","StandNo": "Test Stand Amjad"}]');
        request.setBody(jsonbody);
        
       HttpResponse response = http.send(request);
        system.debug('Response body '+ response.getBody());
if (response.getStatusCode() != 201) {
    System.debug('The status code returned was not expected: ' +
        response.getStatusCode() + ' ' + response.getStatus());
} else {
    System.debug(response.getBody());
}
        
        
    }
    
    Public class OppWrapper
    {
        public String SFDC_RecordID {get;set;}
        public String SFDC_RecordName {get;set;}
        public String SFDC_RecordStage {get;set;}
        public String SFDC_EventName {get;set;}       
        public String SFDC_Record_Unique_ID {get;set;}
        public String Product_Name {get;set;}       
        public String First_Name {get;set;}
        public String Last_Name {get;set;}
        public String Email {get;set;}
        public String Mobile {get;set;}
        public String Salutation {get;set;}
        public String Job_Title {get;set;}     
        
       
        
        public OppWrapper(String SFDC_RecordID,String SFDC_RecordName,String SFDC_RecordStage,String SFDC_EventName,
                          String SFDC_Record_Unique_ID,String Product_Name,String First_Name,String Last_Name,String Email,String Mobile,String Salutation,
                          String Job_Title)
        {
            this.SFDC_RecordID =SFDC_RecordID;
            this.SFDC_RecordName =SFDC_RecordName;
            this.SFDC_RecordStage =SFDC_RecordStage;
            this.SFDC_EventName=SFDC_EventName;           
            this.SFDC_Record_Unique_ID=SFDC_Record_Unique_ID;
            this.Product_Name=Product_Name;          
            this.First_Name=First_Name;
            this.Last_Name=Last_Name;
            this.Email=Email;
            this.Mobile=Mobile;
            this.Salutation=Salutation;
            this.Job_Title=Job_Title;
            
            
        }
    }
    
}

i have created this class for posting the data in third party API but facing governer limits now i need to convert this class into the batch class can any one please help me to achive this requiremnt need urgent please help...........
etting error : - Constructor not defined: need help
public class My_2nd_Api {
    
    Public static void Insert_Records(){
   
        
List<Opportunity> oppbatch=[select id,name,stageName,Edition__r.name,Sub_Allocation_Name__r.name,Account.name,Account.Website,Account.BillingCountry,Account.BillingState,Account.BillingCity,Account.BillingStreet,Account.BillingPostalcode,(select Unique_id__c,Product_Sub_Category_New__c,stand_Number_s__c,Hall_s__c,Type_of_Stand__c,Stand_Depth__c,Stand_Width__c,
                             Contractual_Sq_M__c,    Exhibitor_Id__c,Open_Sides__c from OpportunityLineItems),          (Select contact.firstname,contact.lastname,contact.Email,contact.Phone,contact.Salutation  from OpportunityContactRoles) 
                           from Opportunity  limit  10];

        system.debug('oppbatch List query.. '+oppbatch);
        
List<OppWrapper> oppWrapperVarList = new List<OppWrapper>();
for(Opportunity opp : oppbatch) 
{
 system.debug('Chehking'+opp.OpportunityLineItems);
 OppWrapper oppwrappervar= new OppWrapper(opp.id,opp.name,opp.StageName,opp.Edition__r.name,opp.Sub_Allocation_Name__r.name,opp.Account.name,opp.Account.Website,                                         opp.Account.BillingCountry,opp.Account.BillingState,opp.Account.BillingCity,opp.Account.BillingStreet,                                         opp.Account.BillingPostalcode); 

   
    for(OpportunityLineItem li : opp.OpportunityLineItems)
    {    
        oppwrappervar(li.Unique_id__c,li.Product_Sub_Category_New__c,li.Stand_Number_s__c,li.Hall_s__c,li.Type_of_Stand__c,li.Stand_Depth__c,li.Stand_Width__c,li.Contractual_Sq_M__c);
    }
   for(OpportunityContactRole ocr : opp.OpportunityContactRoles)
    {
       oppwrappervar(ocr.contact.firstname,ocr.contact.lastname,ocr.contact.Email,ocr.contact.Phone,ocr.contact.Salutation);
        
    }
    
  oppWrapperVarList.add(oppwrappervar);
//OppWrapper oppwrappervar=new OppWrapper(oppbtch.Edition_Name__c,oppbtch.Opportunity_Id__c,oppbtch.Opportunity_Name__c,oppbtch.Opportunity_Stage__c,oppbtch.Stand_No__c,oppbtch.Banner_name__c);
//oppWrapperVarList.add(oppwrappervar);
}
 string jsonbody=Json.serialize(oppWrapperVarList);
        system.debug('Json body---->'+jsonbody);
        
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        //request.setEndpoint('http://fpdatamap.salesforceoutsourcing.in/api/FPDatas');
        request.setEndpoint('http://sfdata.iqratechnology.com/api/sf_data');

        request.setMethod('POST');
        request.setHeader('Content-Type','application/json');
        //request.setHeader('Content-Type','multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
        //request.setHeader('Authorization','Bearer '+ AuthorizationToken);
//request.setBody('[{ "RecordId": "456","RecordName": "moosa traders pvt ltd / The Big 5 Construct Egypt 2018 /  / 093061123", "EventName": "a2JD0000001ns6uMAA U", "RecordStage": "Test Stage Amjad","BannerName": "Test Banner Amjad","StandNo": "Test Stand Amjad"}]');
        request.setBody(jsonbody);
        
       HttpResponse response = http.send(request);
        system.debug('Response body '+ response.getBody());
if (response.getStatusCode() != 201) {
    System.debug('The status code returned was not expected: ' +
        response.getStatusCode() + ' ' + response.getStatus());
} else {
    System.debug(response.getBody());
}
        
        
    }
    
    public class OppWrapper
    {
        public String SFDC_RecordID {get;set;}
        public String SFDC_RecordName {get;set;}
        public String SFDC_RecordStage {get;set;}
        public String SFDC_EventName {get;set;}
        public String Stan_Sub_Allocation_Name {get;set;}
        public String Acount_Long_Name {get;set;}
        public String Web_Site {get;set;}
        public String Country {get;set;}
        public String Country_State {get;set;}
        public String City {get;set;}
        public String Street {get;set;}
        public String Post_code {get;set;}
        public String SFDC_Record_Unique_ID {get;set;}
        public String Product_Subcategory {get;set;}
        public String Stand_no {get;set;}
        public String Hall {get;set;}
        public String Type_of_Stand {get;set;}
        public Decimal Height {get;set;}
        public Decimal Width {get;set;}
        public Decimal Contractual_Sq_M {get;set;}
        public String First_Name {get;set;}
        public String Last_Name {get;set;}
        public String Email {get;set;}
        public String Mobile {get;set;}
        public String Salutation {get;set;}
        
        public OppWrapper(String SFDC_RecordID,String SFDC_RecordName,String SFDC_RecordStage,String SFDC_EventName,String Stan_Sub_Allocation_Name,
                          String Acount_Long_Name,String Web_Site,String Country,String Country_State,String City,String Street,String Post_code,
                          String SFDC_Record_Unique_ID,String Product_Subcategory,String Stand_no,String Hall,String Type_of_Stand,Decimal Height,
                          Decimal Width,Decimal Contractual_Sq_M,String First_Name,String Last_Name,String Email,String Mobile,String Salutation)
        {
            this.SFDC_RecordID =SFDC_RecordID;
            this.SFDC_RecordName =SFDC_RecordName;
            this.SFDC_RecordStage =SFDC_RecordStage;
            this.SFDC_EventName=SFDC_EventName;
            this.Stan_Sub_Allocation_Name=Stan_Sub_Allocation_Name;
            this.Acount_Long_Name=Acount_Long_Name;
            this.Web_Site=Web_Site;
            this.Country=Country;
            this.Country_State=Country_State;
            this.City=City;
            this.Street=Street;
            this.Post_code=Post_code;
            this.SFDC_Record_Unique_ID=SFDC_Record_Unique_ID;
            this.Product_Subcategory=Product_Subcategory;
            this.Stand_no=Stand_no;
            this.Hall=Hall;
            this.Type_of_Stand=Type_of_Stand;
            this.Height=Height;
            this.Width=Width;
            this.Contractual_Sq_M=Contractual_Sq_M;
            
            
            
        }
    }
    
}

Getting error on bold line error is :-

Line 17: Constructor not defined: [My_2nd_Api.OppWrapper].<Constructor>(String, String, String, String, String, String, String, String, String, String, String)
Line 24 Method does not exist or incorrect signature: void oppwrappervar(String, String, String, String, Id, Decimal, Decimal, Decimal) from the type My_2nd_Api
Line 29 : Method does not exist or incorrect signature: void oppwrappervar(String, String, String, String, String) from the type My_2nd_Api

Can anyone please help me to solve this error it is urgent 
public class My_2nd_Api {
    
    Public static void Insert_Records(){
   
        
        List<Opportunity> oppbatch=[select id,name,stagename, (select id,name from OpportunityLineItems), (Select contact.firstname,contact.lastname,contact.Email,contact.Phone from OpportunityContactRoles) from Opportunity];
        system.debug('oppbatch List query.. '+oppbatch);
        
List<OppWrapper> oppWrapperVarList = new List<OppWrapper>();
for(Opportunity opp : oppbatch) 
{
 system.debug(opp.OpportunityLineItems);
 OppWrapper oppwrappervar= new OppWrapper(opp.name,opp.StageName,opp.Edition__r.name,opp.Sub_Allocation_Name__r.name,opp.Account.name,opp.Account.Website,                                         opp.Account.BillingCountry,opp.Account.BillingState,opp.Account.BillingCity,opp.Account.BillingStreet,
                                         opp.Account.BillingPostalcode);         
   
    for(OpportunityLineItem li : opp.OpportunityLineItems)
    {    
        oppwrappervar (li.Unique_id__c,li.Product_Sub_Category_New__c,li.Stand_Number_s__c,li.Hall_s__c,li.Type_of_Stand__c,li.Stand_Depth__c,
                       li.Stand_Width__c,li.Contractual_Sq_M__c);
    }
   /* for(OpportunityContactRole ocr : opp.OpportunityContactRoles)
    {
        co.Ocr_Id__c =ocr.id;
        co.Ocr_Name__c=ocr.contact.name;
        co.Ocr_First_Name__c=ocr.contact.firstname;
        co.Ocr_Last_Name__c=ocr.contact.lastname;
        co.Ocr_contactEmail__c=ocr.contact.Email;
        co.Ocr_contactPhone__c=ocr.contact.Phone;
        co.Ocr_Salutation__c=ocr.contact.Salutation;
    }*/
    
  oppWrapperVarList.add(oppwrappervar);
//OppWrapper oppwrappervar=new OppWrapper(oppbtch.Edition_Name__c,oppbtch.Opportunity_Id__c,oppbtch.Opportunity_Name__c,oppbtch.Opportunity_Stage__c,oppbtch.Stand_No__c,oppbtch.Banner_name__c);
//oppWrapperVarList.add(oppwrappervar);
}
 string jsonbody=Json.serialize(oppWrapperVarList);
        system.debug('Json body---->'+jsonbody);
        
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        //request.setEndpoint('http://fpdatamap.salesforceoutsourcing.in/api/FPDatas');
        request.setEndpoint('http://sfdata.iqratechnology.com/api/sf_data');

        request.setMethod('POST');
        request.setHeader('Content-Type','application/json');
        //request.setHeader('Content-Type','multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
        //request.setHeader('Authorization','Bearer '+ AuthorizationToken);
//request.setBody('[{ "RecordId": "456","RecordName": "moosa traders pvt ltd / The Big 5 Construct Egypt 2018 /  / 093061123", "EventName": "a2JD0000001ns6uMAA U", "RecordStage": "Test Stage Amjad","BannerName": "Test Banner Amjad","StandNo": "Test Stand Amjad"}]');
        request.setBody(jsonbody);
        
       HttpResponse response = http.send(request);
        system.debug('Response body '+ response.getBody());
if (response.getStatusCode() != 201) {
    System.debug('The status code returned was not expected: ' +
        response.getStatusCode() + ' ' + response.getStatus());
} else {
    System.debug(response.getBody());
}
        
        
    }
    
    public class OppWrapper
    {
        public String SFDC_RecordID {get;set;}
        public String SFDC_RecordName {get;set;}
        public String SFDC_RecordStage {get;set;}
        public String SFDC_EventName {get;set;}
        public String Stan_Sub_Allocation_Name {get;set;}
        public String Acount_Long_Name {get;set;}
        public String Web_Site {get;set;}
        public String Country {get;set;}
        public String Country_State {get;set;}
        public String City {get;set;}
        public String Street {get;set;}
        public String Post_code {get;set;}
        public String SFDC_Record_Unique_ID {get;set;}
        public String Product_Subcategory {get;set;}
        public String Stand_no {get;set;}
        public String Hall {get;set;}
        public String Type_of_Stand {get;set;}
        public Decimal Height {get;set;}
        public Decimal Width {get;set;}
        public Decimal Contractual_Sq_M {get;set;}
        public OppWrapper(String SFDC_RecordID,String SFDC_RecordName,String SFDC_RecordStage,String SFDC_EventName,String Stan_Sub_Allocation_Name,
                          String Acount_Long_Name,String Web_Site,String Country,String Country_State,String City,String Street,String Post_code,
                          String SFDC_Record_Unique_ID,String Product_Subcategory,String Stand_no,String Hall,String Type_of_Stand,Decimal Height,
                          Decimal Width,Decimal Contractual_Sq_M)
        {
            this.SFDC_RecordID =SFDC_RecordID;
            this.SFDC_RecordName =SFDC_RecordName;
            this.SFDC_RecordStage =SFDC_RecordStage;
            this.SFDC_EventName=SFDC_EventName;
            this.Stan_Sub_Allocation_Name=Stan_Sub_Allocation_Name;
            this.Acount_Long_Name=Acount_Long_Name;
            this.Web_Site=Web_Site;
            this.Country=Country;
            this.Country_State=Country_State;
            this.City=City;
            this.Street=Street;
            this.Post_code=Post_code;
            this.SFDC_Record_Unique_ID=SFDC_Record_Unique_ID;
            this.Product_Subcategory=Product_Subcategory;
            this.Stand_no=Stand_no;
            this.Hall=Hall;
            this.Type_of_Stand=Type_of_Stand;
            this.Height=Height;
            this.Width=Width;
            this.Contractual_Sq_M=Contractual_Sq_M;
            
            
            
        }
    }
    
}


Getting error on bold line error is :-

Line 13 : Constructor not defined: [My_2nd_Api.OppWrapper].<Constructor>(String, String, String, String, String, String, String, String, String, String, String)
Line 19:  Method does not exist or incorrect signature: void oppwrappervar(String, String, String, String, Id, Decimal, Decimal, Decimal) from the type My_2nd_Api

need to devlope query on Opportunity for  id,name,stage & Oppounitylineitem for id,name & OpportunityContactRole for phone,email in a single query for this objects and this fields to be inserted in other custom object

i have devlope this query 
select id,name, (select id,name from OpportunityLineItems), (Select id from OpportunityContactRoles) from Opportunity 

but unale to insert records in my custom object:-
my cutstom obejct Name :- myobject__c
fields in that :- Oppid__c,Oppname__c,Productid__c,ProductName__c,Phone__c,Email__c need to insert in this object

can anyone please help me for to achive this requiremnt

CarTile (Component):-

<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
    <aura:attribute name="car" type="Object" access="public"
                    default="{
                             'sObjectType' : 'Car__c',
                             'Name' : 'Amjad',
                             //'MyOwnField' : 'My Filed Example',
                             'Picture__c' : '/resource/cars/luxury/ford_mustang.jpeg'}"/>
 
    <lightning:button variant="neutral" class="tile" >
    <div style="{# 'background-image: url(' + v.car.Picture__c + ')'}" class="innertile">
    <div class="lower-third">
    <h1 class="slds-truncate">{!v.car.Contact__r.name}</h1>
    </div>
   </div>
   </lightning:button>
</aura:component>

style class:-

.THIS.tile {
    position:relative;
    display: inline-block;
    width: 100%;
    height: 220px;
    padding: 1px !important;  
}

.THIS .innertile{
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
}

.THIS .lower-third {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #FFFFFF;
    background-color: rgba(0, 0, 0, .4);
    padding: 6px 8px;
}

in static resource i store the zip file cars floder having luxury folder under that having ford_mustang.jpeg 

i am trying to impliment Rent a car application i follw this steps to impliment Rent a car application i am just stuck in this part 
where did i missed somthing?
it is not disapolying image on lightining application
see this scrren shot



 
i need to query two values stored in my custom field in my query dynamically 

In my custom object i am having custom field that stores single value like XYZ or multiple values like xyz,ABC now i need to query both values how?
I am  having Http callout class to post the data in third party class is working perfctly according to my requirement , but the thing as i am new on Devlopment so i need to convert this class into the batch class how can i convert this can any please help me i am just stuck on this.........
I am getting this error on this http callout class
Error:-
Constructor not defined: [Post_Records.OppWrapper].<Constructor>(OpportunityLineItem
)


public class Post_Records {
    
    Public static void Insert_Records()
    {           
      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);
       
     List<OppWrapper> oppWrapperVarList = new List<OppWrapper>();
     for(sObject  s : sc) 
     {
       OpportunityLineItem o = (OpportunityLineItem)s ;
       //OppWrapper oppwrappervar=new OppWrapper(o.P_Edition__c,o.P_Opportunity_ID__c,o.p_Opprotuny_name__c,o.P_Stage__c,o.P_Banner__c,o.Stand_Number_s__c);
       OppWrapper oppwrappervar=new OppWrapper(o);
       oppWrapperVarList.add(oppwrappervar);
     }
         system.debug('Tracking --->'+oppWrapperVarList);
        //system.debug('Chehking --->'+oppwrappervar);
        string jsonbody=Json.serialize(oppWrapperVarList);
        system.debug('Json body---->'+jsonbody);
        
        Http http = new Http();
        HttpRequest request = new HttpRequest();
            request.setTimeout(20000);
        //request.setEndpoint('http://fpdatamap.salesforceoutsourcing.in/api/FPDatas');
        request.setEndpoint('http://sfdata.iqratechnology.com/api/data');

        request.setMethod('POST');
        request.setHeader('Content-Type','application/json');
     
        request.setBody(jsonbody);
        
       HttpResponse response = http.send(request);
        system.debug('Response body '+ response.getBody());
     if (response.getStatusCode() != 201) {
        System.debug('The status code returned was not expected: ' +
        response.getStatusCode() + ' ' + response.getStatus());
      } else {
    System.debug(response.getBody());
    }
        
        
    }
    
    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 BannerName {get;set;}
        public String StandNo {get;set;}
        public OppWrapper(String EventName,String RecordId,String RecordName,String RecordStage,String BannerName,String StandNo)
        {
            this.EventName =EventName;
            this.RecordId =RecordId;
            this.RecordName =RecordName;
            this.RecordStage=RecordStage;
            this.BannerName=BannerName;
            this.StandNo=StandNo;
            
        }
    }
    
}
Error:-
|System.QueryException: unexpected token: 'null'


i am getting this error in myclass when i not selected any field
i need to this is dynamically hoe can i do that 

my query like:-

select ID,P_Edition__c,p_Opprotuny_name__c,P_Opportunity_ID__c,P_Stage__c,P_Banner__c,null from opportunitylineitem where P_Edition__c = 'Adipec 2018'

how can avoid that if any time i skeep that field and run the class did not get this error please help me

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

public class Flr_Insert_Records {
    
    Public static void Insert_Records(){
        /* Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('http://fpdatamap.salesforceoutsourcing.in/api/FPData');
request.setMethod('POST');
request.setHeader('Content-Type','application/json');
//request.setHeader('Content-Type','multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
//request.setHeader('Authorization','Bearer '+ AuthorizationToken);*/
        
        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  ];
        system.debug('oppbatch List query.. '+oppbatch);
        // system.debug('Query after serialization '+json.serialize(oppbatch));
        /*OppWrapper oppwrappervar=new OppWrapper(oppbatch[0].Edition_Name__c,oppbatch[0].Opportunity_Id__c,oppbatch[0].Opportunity_Name__c,
                                                oppbatch[0].Opportunity_Stage__c,oppbatch[0].Stand_No__c,oppbatch[0].Banner_name__c);
        string jsonbody=Json.serialize(oppwrappervar);*/
        // Right code 
List<OppWrapper> oppWrapperVarList = new List<OppWrapper>();
for(Opportunity_Prod_Batch_Record__c oppbtch : oppbatch) {
   OppWrapper oppwrappervar=new OppWrapper(oppbtch.Edition_Name__c,oppbtch.Opportunity_Id__c,oppbtch.Opportunity_Name__c,oppbtch.Opportunity_Stage__c,oppbtch.Stand_No__c,oppbtch.Banner_name__c);
oppWrapperVarList.add(oppwrappervar);
}
 string jsonbody=Json.serialize(oppWrapperVarList);
        system.debug('Json body---->'+jsonbody);
        
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint('http://fpdatamap.salesforceoutsourcing.in/api/FPDatas');
        request.setMethod('POST');
        request.setHeader('Content-Type','application/json');
        //request.setHeader('Content-Type','multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
        //request.setHeader('Authorization','Bearer '+ AuthorizationToken);
//request.setBody('[{ "RecordId": "456","RecordName": "moosa traders pvt ltd / The Big 5 Construct Egypt 2018 /  / 093061123", "EventName": "a2JD0000001ns6uMAA U", "RecordStage": "Test Stage Amjad","BannerName": "Test Banner Amjad","StandNo": "Test Stand Amjad"}]');
        request.setBody(jsonbody);
        
       HttpResponse response = http.send(request);
        system.debug('Response body '+ response.getBody());
if (response.getStatusCode() != 201) {
    System.debug('The status code returned was not expected: ' +
        response.getStatusCode() + ' ' + response.getStatus());
} else {
    System.debug(response.getBody());
}
        
        
    }
    
    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;
            
        }
    }
    
}

 

it is working fine just i need to do whnerver records existis then it will skeep that record and post remaning records how to achive that please help me..................

This class is working fine it feteches data from Opportunity_Prod_Batch_Record__c (custom object ) and stored the records in third party api but in my custom object having lost of records but when i run this class manually then it is taking randamly only one record i need all the records to post in third party api how can i achive this please help..............


public class Flr_Insert_Records {
    
    Public static void Insert_Records(){
        /* Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('http://fpdatamap.salesforceoutsourcing.in/api/FPData');
request.setMethod('POST');
request.setHeader('Content-Type','application/json');
//request.setHeader('Content-Type','multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
//request.setHeader('Authorization','Bearer '+ AuthorizationToken);*/
        
        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  ];
        system.debug('oppbatch List query '+oppbatch);
        // system.debug('Query after serialization '+json.serialize(oppbatch));
        OppWrapper oppwrappervar=new OppWrapper(oppbatch[0].Edition_Name__c,oppbatch[0].Opportunity_Id__c,oppbatch[0].Opportunity_Name__c,
                                                oppbatch[0].Opportunity_Stage__c,oppbatch[0].Stand_No__c,oppbatch[0].Banner_name__c);
        string jsonbody=Json.serialize(oppwrappervar);
        system.debug('Json body---->'+jsonbody);
        
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint('http://fpdatamap.salesforceoutsourcing.in/api/FPD');
        request.setMethod('POST');
        request.setHeader('Content-Type','application/json');
        //request.setHeader('Content-Type','multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
        //request.setHeader('Authorization','Bearer '+ AuthorizationToken);
//request.setBody('[{ "RecordId": "456","RecordName": "moosa traders pvt ltd / The Big 5 Construct Egypt 2018 /  / 093061123", "EventName": "a2JD0000001ns6uMAA U", "RecordStage": "Test Stage Amjad","BannerName": "Test Banner Amjad","StandNo": "Test Stand Amjad"}]');
        request.setBody('['+jsonbody+']');
        
       HttpResponse response = http.send(request);
        system.debug('Response body '+ response.getBody());
if (response.getStatusCode() != 201) {
    System.debug('The status code returned was not expected: ' +
        response.getStatusCode() + ' ' + response.getStatus());
} else {
    System.debug(response.getBody());
}
        
        
    }
    
    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;
            
        }
    }
    
}

ex:- in my custom object having 8 records but when i run the class it is posting only one recrod so plesse help to post all records in third party api need urgent........
User-added image

above scrren shot shows on left hand side portion i was selected some filds  then after right hand side i was not selected any selected filds on that time i run dynamic query using Query button so the thing is i need to if i was not selected any selected field on that time it will not thogh any error can it be possible ??
i am having vf page and having 6 fields to select the fields are coming after selection of object then i have button called Query then according field selection we are getting selected object recrods then after this records i need to store in my cutom object how can i store can any one please help it it very urgent i and i am stuck on it..

please see below scrren shot of vf page with results 

User-added image
User-added image

In that scrren shot i am selected Opportuntiy Line itme object according to i have to select multiple fields according to which object was selected then after according which ever first field was selected i need to search records according to the fiirst field ex : I have selected Edition Name is field in that having values like Adipec 2018,Adipec 2017 then this error occurs why ???

see this error scrre shot

User-added image

why this error occurs ???? any sloution on that ..??
I need to search two values 
like xyz1,xyz2 using single search on vf page also from dynamic query

currently i am having this query:-
string queryStr1 = 'SELECT ID, NAME, createdBy.Name, createdDate, lastModifiedBy.Name, lastModifiedDate,'+fldAPINameMap.get(selectedField)+' FROM '+selectedObject+' WHERE '+fldAPINameMap.get(selectedField)+' like \'%'+criteria+'%\'';
like i am selected Edition field on vf page now i am searching in search box :- Adipac 2018 this will running suceffuly but when i trying to search two values like :- Adipec 2018,Adipec 2017 so on this it is not working

can any one help me to achive this
here is my code:-

public with sharing class ObjectQueryController2 {
    public List<Contact> conts{get;set;}
    public Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
    private Map<String, String> fldAPINameMap = new Map<String,String>();
    //Private set on SelectOption is so that values can be set from the controller.  
    public List<SelectOption> objectNames{public get; private set;}
    public String selectedObject {get; set;}
    public String selectedField {get;set;}
    public String selectedFieldAPI {get;set;}
    private List<SelectOption> fields;
    Public string criteria{get;set;}
    public List<sObject> results{get;set;}
    public boolean queried {get;set;}
    
    // TO DO:
    // - Error handling when user selects ID or Name fields to query (Any Duplicate Fields)
    // - Handle queries of fields that are different than text
    // - Allow the selection of multiple fields
    // - Allow Mass Update of fields on queried records
    // - Insert new records
   
    public List<SelectOption> getObjFields() {        
        fields.clear();
        if(queried == null){queried = false;}
        system.debug('Page loading, Queried is: '+queried);
        
        // If an object was not selected yet, just populate the text 'Select object first'
        if(selectedObject == NULL){
            fields.add(new selectOption('Select Object First', 'Select Object First'));
        } 
                
        // if object was selected, create a list of the object's fields
        else {            
            system.debug('$$$$$' + selectedObject);
            
            //We get a string of the sOjbects using the schemaMap.
            Map <String, Schema.SObjectField> fieldMap = schemaMap.get(selectedObject).getDescribe().fields.getMap();
            
            for(Schema.SObjectField sfield : fieldMap.Values())
            {
                schema.describefieldresult dfield = sfield.getDescribe();
                String fieldName = dfield.getLabel();
                fields.add(new SelectOption(fieldName, fieldName));
                fldAPINameMap.put(fieldName, dfield.getname());
            }
        }
        return fields;
    }
    
    // Constructor - this method will run when the controller is instantiated
    public ObjectQueryController2(){
        objectNames = initObjNames();
        fields = new List<SelectOption>();
        List<sObject> results = new List<sObject>(); 
        String Criteria;
    }
    
    // Populate SelectOption list -
    
    // find all sObjects available in the organization
    
    private List<SelectOption> initObjNames() {
        List<SelectOption> objNames = new List<SelectOption>();
        List<String> entities = new List<String>(schemaMap.keySet());
        entities.sort();
        for(String name : entities)
            objNames.add(new SelectOption(name,name));
        return objNames;
    }
    
    //Instantiate the list cast records.  We pull id, Name and other needed fields for our pageBlockTable in our VF page
    
    public void btnPerformQuery(){
        
        string queryStr1 = 'SELECT ID, NAME, createdBy.Name, createdDate, lastModifiedBy.Name, lastModifiedDate,'+fldAPINameMap.get(selectedField)+' FROM '+selectedObject+' WHERE '+fldAPINameMap.get(selectedField)+' like \'%'+criteria+'%\'';
        selectedFieldAPI = fldAPINameMap.get(selectedField);
        system.Debug(queryStr1);
        results = database.query(queryStr1);
        System.Debug(results.size());
        queried = true;
        system.debug('Query performed, Queried is: '+queried);
        
    }
}
string queryStr1 = 'SELECT ID, NAME, createdBy.Name, createdDate, lastModifiedBy.Name, lastModifiedDate, '+fldAPINameMap.get(selectedField)+' FROM '+selectedObject+' WHERE '+fldAPINameMap.get(selectedField)+' like \'%'+criteria+'%\'';

the above Dynamic query  is working perfectly on single select feild but now i am having multiple fields to select then after run query according to selected fields so it is not working
 
public class My_2nd_Api {
    
    Public static void Insert_Records(){
   
        
List<Opportunity> oppbatch=[select id,name,stageName, Edition__r.name,                          
                            (select id, name from OpportunityLineItems  ), 
                            (Select contact.firstname,contact.lastname,contact.Email,contact.Phone,contact.Salutation,contact.title  from OpportunityContactRoles) 
                           from Opportunity where Edition__r.name ='FM EXPO 2017' AND  HasOpportunityLineItem = true ];
                            
        system.debug('oppbatch List query.. '+oppbatch);
        
List<OppWrapper> oppWrapperVarList = new List<OppWrapper>();
for(Opportunity opp : oppbatch) 
{
 system.debug('Chehking'+opp.OpportunityLineItems);
 OppWrapper oppwrappervar = new OppWrapper(opp.id,opp.name,opp.StageName,opp.Edition__r.name,                                        
                                                                                  
                                           null, null, null, null, null); 

    
    for(OpportunityLineItem li : opp.OpportunityLineItems)
    {    
        oppwrappervar.SFDC_Record_Unique_ID=li.id;
        oppwrappervar.Product_Name=li.name;
              
    }
   for(OpportunityContactRole ocr : opp.OpportunityContactRoles)
    {
        oppwrappervar.First_Name = ocr.contact.firstname;
        oppwrappervar.Last_Name =ocr.contact.lastname ;
        oppwrappervar.Email=ocr.contact.Email;
        oppwrappervar.Mobile=ocr.contact.Phone;
        oppwrappervar.Salutation=ocr.contact.Salutation;
        oppwrappervar.Job_Title=ocr.contact.title;        
    }
    
oppWrapperVarList.add(oppwrappervar);
}
 string jsonbody=Json.serialize(oppWrapperVarList);
        system.debug('Json body---->'+jsonbody);
        
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        //request.setEndpoint('http://fpdatamap.salesforceoutsourcing.in/api/FPDatas');
        request.setEndpoint('http://sfdata.iqratechnology.com/api/fs_metadata');

        request.setMethod('POST');
        request.setHeader('Content-Type','application/json');
        //request.setHeader('Content-Type','multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
        //request.setHeader('Authorization','Bearer '+ AuthorizationToken);
//request.setBody('[{ "RecordId": "456","RecordName": "moosa traders pvt ltd / The Big 5 Construct Egypt 2018 /  / 093061123", "EventName": "a2JD0000001ns6uMAA U", "RecordStage": "Test Stage Amjad","BannerName": "Test Banner Amjad","StandNo": "Test Stand Amjad"}]');
        request.setBody(jsonbody);
        
       HttpResponse response = http.send(request);
        system.debug('Response body '+ response.getBody());
if (response.getStatusCode() != 201) {
    System.debug('The status code returned was not expected: ' +
        response.getStatusCode() + ' ' + response.getStatus());
} else {
    System.debug(response.getBody());
}
        
        
    }
    
    Public class OppWrapper
    {
        public String SFDC_RecordID {get;set;}
        public String SFDC_RecordName {get;set;}
        public String SFDC_RecordStage {get;set;}
        public String SFDC_EventName {get;set;}       
        public String SFDC_Record_Unique_ID {get;set;}
        public String Product_Name {get;set;}       
        public String First_Name {get;set;}
        public String Last_Name {get;set;}
        public String Email {get;set;}
        public String Mobile {get;set;}
        public String Salutation {get;set;}
        public String Job_Title {get;set;}     
        
       
        
        public OppWrapper(String SFDC_RecordID,String SFDC_RecordName,String SFDC_RecordStage,String SFDC_EventName,
                          String SFDC_Record_Unique_ID,String Product_Name,String First_Name,String Last_Name,String Email,String Mobile,String Salutation,
                          String Job_Title)
        {
            this.SFDC_RecordID =SFDC_RecordID;
            this.SFDC_RecordName =SFDC_RecordName;
            this.SFDC_RecordStage =SFDC_RecordStage;
            this.SFDC_EventName=SFDC_EventName;           
            this.SFDC_Record_Unique_ID=SFDC_Record_Unique_ID;
            this.Product_Name=Product_Name;          
            this.First_Name=First_Name;
            this.Last_Name=Last_Name;
            this.Email=Email;
            this.Mobile=Mobile;
            this.Salutation=Salutation;
            this.Job_Title=Job_Title;
            
            
        }
    }
    
}

i have created this class for posting the data in third party API but facing governer limits now i need to convert this class into the batch class can any one please help me to achive this requiremnt need urgent please help...........
etting error : - Constructor not defined: need help
public class My_2nd_Api {
    
    Public static void Insert_Records(){
   
        
List<Opportunity> oppbatch=[select id,name,stageName,Edition__r.name,Sub_Allocation_Name__r.name,Account.name,Account.Website,Account.BillingCountry,Account.BillingState,Account.BillingCity,Account.BillingStreet,Account.BillingPostalcode,(select Unique_id__c,Product_Sub_Category_New__c,stand_Number_s__c,Hall_s__c,Type_of_Stand__c,Stand_Depth__c,Stand_Width__c,
                             Contractual_Sq_M__c,    Exhibitor_Id__c,Open_Sides__c from OpportunityLineItems),          (Select contact.firstname,contact.lastname,contact.Email,contact.Phone,contact.Salutation  from OpportunityContactRoles) 
                           from Opportunity  limit  10];

        system.debug('oppbatch List query.. '+oppbatch);
        
List<OppWrapper> oppWrapperVarList = new List<OppWrapper>();
for(Opportunity opp : oppbatch) 
{
 system.debug('Chehking'+opp.OpportunityLineItems);
 OppWrapper oppwrappervar= new OppWrapper(opp.id,opp.name,opp.StageName,opp.Edition__r.name,opp.Sub_Allocation_Name__r.name,opp.Account.name,opp.Account.Website,                                         opp.Account.BillingCountry,opp.Account.BillingState,opp.Account.BillingCity,opp.Account.BillingStreet,                                         opp.Account.BillingPostalcode); 

   
    for(OpportunityLineItem li : opp.OpportunityLineItems)
    {    
        oppwrappervar(li.Unique_id__c,li.Product_Sub_Category_New__c,li.Stand_Number_s__c,li.Hall_s__c,li.Type_of_Stand__c,li.Stand_Depth__c,li.Stand_Width__c,li.Contractual_Sq_M__c);
    }
   for(OpportunityContactRole ocr : opp.OpportunityContactRoles)
    {
       oppwrappervar(ocr.contact.firstname,ocr.contact.lastname,ocr.contact.Email,ocr.contact.Phone,ocr.contact.Salutation);
        
    }
    
  oppWrapperVarList.add(oppwrappervar);
//OppWrapper oppwrappervar=new OppWrapper(oppbtch.Edition_Name__c,oppbtch.Opportunity_Id__c,oppbtch.Opportunity_Name__c,oppbtch.Opportunity_Stage__c,oppbtch.Stand_No__c,oppbtch.Banner_name__c);
//oppWrapperVarList.add(oppwrappervar);
}
 string jsonbody=Json.serialize(oppWrapperVarList);
        system.debug('Json body---->'+jsonbody);
        
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        //request.setEndpoint('http://fpdatamap.salesforceoutsourcing.in/api/FPDatas');
        request.setEndpoint('http://sfdata.iqratechnology.com/api/sf_data');

        request.setMethod('POST');
        request.setHeader('Content-Type','application/json');
        //request.setHeader('Content-Type','multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
        //request.setHeader('Authorization','Bearer '+ AuthorizationToken);
//request.setBody('[{ "RecordId": "456","RecordName": "moosa traders pvt ltd / The Big 5 Construct Egypt 2018 /  / 093061123", "EventName": "a2JD0000001ns6uMAA U", "RecordStage": "Test Stage Amjad","BannerName": "Test Banner Amjad","StandNo": "Test Stand Amjad"}]');
        request.setBody(jsonbody);
        
       HttpResponse response = http.send(request);
        system.debug('Response body '+ response.getBody());
if (response.getStatusCode() != 201) {
    System.debug('The status code returned was not expected: ' +
        response.getStatusCode() + ' ' + response.getStatus());
} else {
    System.debug(response.getBody());
}
        
        
    }
    
    public class OppWrapper
    {
        public String SFDC_RecordID {get;set;}
        public String SFDC_RecordName {get;set;}
        public String SFDC_RecordStage {get;set;}
        public String SFDC_EventName {get;set;}
        public String Stan_Sub_Allocation_Name {get;set;}
        public String Acount_Long_Name {get;set;}
        public String Web_Site {get;set;}
        public String Country {get;set;}
        public String Country_State {get;set;}
        public String City {get;set;}
        public String Street {get;set;}
        public String Post_code {get;set;}
        public String SFDC_Record_Unique_ID {get;set;}
        public String Product_Subcategory {get;set;}
        public String Stand_no {get;set;}
        public String Hall {get;set;}
        public String Type_of_Stand {get;set;}
        public Decimal Height {get;set;}
        public Decimal Width {get;set;}
        public Decimal Contractual_Sq_M {get;set;}
        public String First_Name {get;set;}
        public String Last_Name {get;set;}
        public String Email {get;set;}
        public String Mobile {get;set;}
        public String Salutation {get;set;}
        
        public OppWrapper(String SFDC_RecordID,String SFDC_RecordName,String SFDC_RecordStage,String SFDC_EventName,String Stan_Sub_Allocation_Name,
                          String Acount_Long_Name,String Web_Site,String Country,String Country_State,String City,String Street,String Post_code,
                          String SFDC_Record_Unique_ID,String Product_Subcategory,String Stand_no,String Hall,String Type_of_Stand,Decimal Height,
                          Decimal Width,Decimal Contractual_Sq_M,String First_Name,String Last_Name,String Email,String Mobile,String Salutation)
        {
            this.SFDC_RecordID =SFDC_RecordID;
            this.SFDC_RecordName =SFDC_RecordName;
            this.SFDC_RecordStage =SFDC_RecordStage;
            this.SFDC_EventName=SFDC_EventName;
            this.Stan_Sub_Allocation_Name=Stan_Sub_Allocation_Name;
            this.Acount_Long_Name=Acount_Long_Name;
            this.Web_Site=Web_Site;
            this.Country=Country;
            this.Country_State=Country_State;
            this.City=City;
            this.Street=Street;
            this.Post_code=Post_code;
            this.SFDC_Record_Unique_ID=SFDC_Record_Unique_ID;
            this.Product_Subcategory=Product_Subcategory;
            this.Stand_no=Stand_no;
            this.Hall=Hall;
            this.Type_of_Stand=Type_of_Stand;
            this.Height=Height;
            this.Width=Width;
            this.Contractual_Sq_M=Contractual_Sq_M;
            
            
            
        }
    }
    
}

Getting error on bold line error is :-

Line 17: Constructor not defined: [My_2nd_Api.OppWrapper].<Constructor>(String, String, String, String, String, String, String, String, String, String, String)
Line 24 Method does not exist or incorrect signature: void oppwrappervar(String, String, String, String, Id, Decimal, Decimal, Decimal) from the type My_2nd_Api
Line 29 : Method does not exist or incorrect signature: void oppwrappervar(String, String, String, String, String) from the type My_2nd_Api

Can anyone please help me to solve this error it is urgent 

need to devlope query on Opportunity for  id,name,stage & Oppounitylineitem for id,name & OpportunityContactRole for phone,email in a single query for this objects and this fields to be inserted in other custom object

i have devlope this query 
select id,name, (select id,name from OpportunityLineItems), (Select id from OpportunityContactRoles) from Opportunity 

but unale to insert records in my custom object:-
my cutstom obejct Name :- myobject__c
fields in that :- Oppid__c,Oppname__c,Productid__c,ProductName__c,Phone__c,Email__c need to insert in this object

can anyone please help me for to achive this requiremnt

CarTile (Component):-

<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
    <aura:attribute name="car" type="Object" access="public"
                    default="{
                             'sObjectType' : 'Car__c',
                             'Name' : 'Amjad',
                             //'MyOwnField' : 'My Filed Example',
                             'Picture__c' : '/resource/cars/luxury/ford_mustang.jpeg'}"/>
 
    <lightning:button variant="neutral" class="tile" >
    <div style="{# 'background-image: url(' + v.car.Picture__c + ')'}" class="innertile">
    <div class="lower-third">
    <h1 class="slds-truncate">{!v.car.Contact__r.name}</h1>
    </div>
   </div>
   </lightning:button>
</aura:component>

style class:-

.THIS.tile {
    position:relative;
    display: inline-block;
    width: 100%;
    height: 220px;
    padding: 1px !important;  
}

.THIS .innertile{
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
}

.THIS .lower-third {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #FFFFFF;
    background-color: rgba(0, 0, 0, .4);
    padding: 6px 8px;
}

in static resource i store the zip file cars floder having luxury folder under that having ford_mustang.jpeg 

i am trying to impliment Rent a car application i follw this steps to impliment Rent a car application i am just stuck in this part 
where did i missed somthing?
it is not disapolying image on lightining application
see this scrren shot



 
i need to query two values stored in my custom field in my query dynamically 

In my custom object i am having custom field that stores single value like XYZ or multiple values like xyz,ABC now i need to query both values how?
I am  having Http callout class to post the data in third party class is working perfctly according to my requirement , but the thing as i am new on Devlopment so i need to convert this class into the batch class how can i convert this can any please help me i am just stuck on this.........