• Kumar Saurav 45
  • NEWBIE
  • 20 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 11
    Replies
My method is now returning null. However, I want to return a String saying that 'No value found' instead of null. My method is public static Map<Id,sObject>() type. Please refer to my code below:

 
public static Map<Id,Workday_Project_Hierarchy__c> getWorkdayHierarchies(Map<Id,Opportunity> WorkdayOppProject,Map<Id,String> Opp_ProjectTypeVal){
        Map<Id,String> workDayProjectHierarchyNames = new Map<Id,String>();
        Map<Opportunity,String> workdayProHierMap = new Map<Opportunity,String>();
        Map<Id,Workday_Project_Hierarchy__c> proHierarchyMap = new Map<Id,Workday_Project_Hierarchy__c>();
        List<String> Projecttypelst = new List<String> ();
        List<String> ProjectHierlst = new List<String> ();
        Map<Id,Workday_Project_Hierarchy__c> hierarchyList;
        Map<Id,Workday_Project_Hierarchy__c> Opp_ProjectHierFinalVal = new Map<Id,Workday_Project_Hierarchy__c> ();
        String ADS = 'Adaptive Insights';
        String DA = 'Delivery Assurance';
        String NonDANonAI = 'Non DA && Non AI';
        String PSA ='Planning Office Hours';
        String Greater = 'greater than or equals to';
        String Hire_Val = 'Null Values';
        List<String> WDHlst = new List <String> ();
        List<Workday_Project_Hierarchy__c> WorkProjHie_With_State = new List<Workday_Project_Hierarchy__c> ();
        List<Workday_Project_Hierarchy__c> WorkProjHie_Without_State = new List<Workday_Project_Hierarchy__c> ();
        if(!Opp_ProjectTypeVal.isEmpty())
            Projecttypelst.addall(Opp_ProjectTypeVal.values());
        
        System.debug('values of Projecttypelst' + Projecttypelst);
        if(!Projecttypelst.isEmpty())
            hierarchyList = new Map<Id,Workday_Project_Hierarchy__c>([SELECT Id,Name,Customer_Account_Region__c,Customer_Address__c,Employee_Count__c,Operator__c,Project_Type__c,
                                                                      PS_Region__c,PS_Sub_Region__c,Type__c,Workday_Services__c,State__c,Maximum_Employee_Count__c,Region__c,
                                                                      Minimum_Employee_Count__c
                                                                      From Workday_Project_Hierarchy__c /*Where Project_Type__c IN : Projecttypelst*/]);
        System.debug('values of hierarchyList' + hierarchyList);  
        
        if(!hierarchyList.isEmpty()){
            for(Workday_Project_Hierarchy__c w : hierarchyList.values()){
                if(w.State__c != null && w.State__c != '')
                WorkProjHie_With_State.add(w);
                else
                WorkProjHie_Without_State.add(w);
                 WDHlst.add(w.Project_Type__c);
            }
         
        system.debug('WorkProjHie_Without_State' + WorkProjHie_Without_State);
            //loop through all the Opp values to get the Map<OppId,ProjectHierarchy>.
        if(!WorkProjHie_With_State.isEmpty() || !WorkProjHie_Without_State.isEmpty())
       for(Opportunity o : WorkdayOppProject.values()){
                    
        if(o.Opportunity_PS_Region__c != null && o.Opportunity_PS_Region__c != '' && o.WD_Prime_Type__c == 'Planning' 
           && o.Opportunity_PS_Region__c != 'EMEA' && o.Opportunity_PS_Region__c != 'APJ'){
                           
              for(Workday_Project_Hierarchy__c wp0 : WorkProjHie_With_State){  
                  system.debug('Project type' + wp0.Project_Type__c);
                  system.debug( 'Opp Project type' + Opp_ProjectTypeVal.get(o.id).trim());
                               
                      List<String> w0 = new List<String> ();
                      String s0 = '';
                      s0 = wp0.Project_Type__c;
                      w0.addall(s0.split(';')); 
              if(w0.contains(Opp_ProjectTypeVal.get(o.id).trim())){       
                     system.debug('Contains check' + wp0.PS_Region__c + '>>> '+ o.Opportunity_PS_Region__c); 
                         if(wp0.Employee_Count__c != null && wp0.Operator__c == 'greater than or equals to' &&  o.APTS_Account_NumberOfEmployees__c >= wp0.Employee_Count__c
                            && (wp0.State__c != null || wp0.State__c != '') && o.Account_billing_state__c != null && o.Account_billing_state__c == wp0.State__c 
                            && (wp0.Workday_Services__c == '' || wp0.Workday_Services__c == null)){
                            system.debug('with state / greater than ');
                                          
                                 Opp_ProjectHierFinalVal.put(o.id,wp0);
                             }
                          if(wp0.Employee_Count__c != null && wp0.Operator__c == 'less than or equals to' &&  o.APTS_Account_NumberOfEmployees__c <= wp0.Employee_Count__c
                             && (wp0.State__c != null || wp0.State__c != '') && o.Account_billing_state__c != null && o.Account_billing_state__c == wp0.State__c 
                             && (wp0.Workday_Services__c == '' || wp0.Workday_Services__c == null)){
                                          
                                   Opp_ProjectHierFinalVal.put(o.id,wp0);
                             }
                           if(wp0.Employee_Count__c != null && wp0.Operator__c == 'between' && wp0.Employee_Count__c == null  && o.APTS_Account_NumberOfEmployees__c != null 
                              && o.APTS_Account_NumberOfEmployees__c < wp0.Maximum_Employee_Count__c 
                              && o.APTS_Account_NumberOfEmployees__c > wp0.Minimum_Employee_Count__c
                              && (wp0.State__c != null || wp0.State__c != '') && o.Account_billing_state__c == wp0.State__c && (wp0.Workday_Services__c == '' || wp0.Workday_Services__c == null)){
                                          
                                     Opp_ProjectHierFinalVal.put(o.id,wp0);
                              }                              
                          }       
                    }           
      } else if (o.Opportunity_PS_Region__c != null && o.Opportunity_PS_Region__c !='' 
                      /* && o.Opportunity_PS_Sub_Region__c !=null && o.Opportunity_PS_Sub_Region__c !=''*/){         
                                      
           for(Workday_Project_Hierarchy__c wp : WorkProjHie_Without_State){
               
              system.debug('Project type without' + wp.Project_Type__c);
              system.debug( 'Opp Project typewithout' + Opp_ProjectTypeVal.get(o.id).trim());
                                          
                      List<String> w = new List<String> ();
                      String s = '';
                      s = wp.Project_Type__c;
                      w.addall(s.split(';'));
               system.debug('split project type-->' + w);
                                          
            if(w.contains(Opp_ProjectTypeVal.get(o.id).trim())){
                                              
               system.debug('Contains check without' + wp.PS_Region__c + '>>> '+ o.Opportunity_PS_Region__c);
       //check for the Opp deal type is planning and PS region not equal to EMEA and APJ to check the state values.
                                              
                if(wp.PS_Region__c != null && wp.PS_Region__c != ''){                                                  
                    if(wp.PS_Sub_Region__c == '' || wp.PS_Sub_Region__c == null){
                       System.debug('In Ps sub region Null');                               
                       if(o.Opportunity_PS_Region__c != null && o.Opportunity_PS_Region__c == wp.PS_Region__c.trim()
                           && wp.Employee_Count__c == null  && (wp.Workday_Services__c == '' || wp.Workday_Services__c == null)){
                                                             
                                  Opp_ProjectHierFinalVal.put(o.id,wp);
                         }
                       If(o.Opportunity_PS_Region__c != null && o.Opportunity_PS_Region__c == wp.PS_Region__c.trim()
                          && (wp.Workday_Services__c == '' || wp.Workday_Services__c == null)
                          &&  wp.Employee_Count__c != null && wp.Operator__c == 'greater than or equals to' 
                          &&  o.APTS_Account_NumberOfEmployees__c >= wp.Employee_Count__c){
                                                             
                                   Opp_ProjectHierFinalVal.put(o.id,wp);
                         }
                       If(o.Opportunity_PS_Region__c != null && o.Opportunity_PS_Region__c == wp.PS_Region__c.trim()
                          && (wp.Workday_Services__c == '' || wp.Workday_Services__c == null)
                          && wp.Employee_Count__c != null && wp.Operator__c == 'less than or equals to' 
                          &&  o.APTS_Account_NumberOfEmployees__c <= wp.Employee_Count__c){
                                                             
                                    Opp_ProjectHierFinalVal.put(o.id,wp);
                         }                                                      
                 }// Sub region null check
                If(wp.PS_Sub_Region__c != null && wp.PS_Sub_Region__c != ''){
                     System.debug('In PS sub region Not Null--> ');                                 
                   if(o.Opportunity_PS_Region__c.trim() == wp.PS_Region__c.trim() && 
                      o.Opportunity_PS_Sub_Region__c.trim() == wp.PS_Sub_Region__c){
                           system.debug('Ps region and PS sub region');                                  
                      if(wp.Employee_Count__c != null && wp.Operator__c == 'greater than or equals to'
                         &&  o.APTS_Account_NumberOfEmployees__c >= wp.Employee_Count__c
                         && (wp.Workday_Services__c == '' || wp.Workday_Services__c == null)){
                              system.debug('Emp count greater than :--');                                      
                              Opp_ProjectHierFinalVal.put(o.id,wp);  
                      }
                      if(wp.Employee_Count__c != null && wp.Operator__c == 'less than or equals to' && 
                        o.APTS_Account_NumberOfEmployees__c <= wp.Employee_Count__c && 
                       (wp.Workday_Services__c == '' || wp.Workday_Services__c == null)){
                                                                    
                              Opp_ProjectHierFinalVal.put(o.id,wp);                                            
                     }                                        
                     if(wp.Employee_Count__c == null && wp.Operator__c == 'between' && 
                        o.APTS_Account_NumberOfEmployees__c != null &&
                        o.APTS_Account_NumberOfEmployees__c < wp.Maximum_Employee_Count__c &&
                        o.APTS_Account_NumberOfEmployees__c > wp.Minimum_Employee_Count__c ){
                                                                    
                              Opp_ProjectHierFinalVal.put(o.id,wp);        
                    }                                                            
                    if(wp.Employee_Count__c == null && (wp.Operator__c == null || wp.Operator__c == '') &&
                      (wp.Workday_Services__c == '' || wp.Workday_Services__c == null)){
                                                                    
                             Opp_ProjectHierFinalVal.put(o.id,wp); 
                    }
                    if(wp.Employee_Count__c != null && wp.Operator__c == 'greater than or equals to' 
                       &&  o.APTS_Account_NumberOfEmployees__c >= wp.Employee_Count__c 
                       && wp.Workday_Services__c != null
                       &&  o.Workday_Services__c != null 
                       && o.Workday_Services__c == wp.Workday_Services__c){
                                                                    
                             Opp_ProjectHierFinalVal.put(o.id,wp);   
                   }                                                             
                   if(wp.Employee_Count__c != null && wp.Operator__c == 'less than or equals to'
                      &&  o.APTS_Account_NumberOfEmployees__c <= wp.Employee_Count__c
                      && wp.Workday_Services__c != null
                      && o.Workday_Services__c != null
                      && o.Workday_Services__c == wp.Workday_Services__c){   
                          
                              Opp_ProjectHierFinalVal.put(o.id,wp);
                    }                                     
                  } //Ps region and Ps sub region Not null
                                                      
               }// wp.PS_Sub_Region__c null check.(Not null)
            }// null check for wp.PS_Region__c.
          }//Project Type If ends here.
        }//WSP for loop end here  //WPH for without state 
      }//else loop if Opp is EMEA and APJ
                   else{
                        system.debug('the opportunity region is blank.');
                    }
                }//Opportunity For end ghere.
   // }//state with or without
       } //hierarchyList empty check.
        if(!Opp_ProjectHierFinalVal.isEmpty() || Opp_ProjectHierFinalVal!= null){
            system.debug('final Workday hierarchy Project record:' + Opp_ProjectHierFinalVal);
            return Opp_ProjectHierFinalVal;
        }
        
return null; // HERE I WANT TO RETURN A STRING MESSAGE SAYING THAT 'NO VALUE FOUND' 
}//end of method. 










 
I am trying to develop a Lightning Component which will display the weather report. I am sending the request to the server and I am also getting success response. However, I am not getting the weather report on my Lightning Component.

Can someone please help me in showing the weather report on lightning component? 

I got some links to install the app from appexchange. However, I need to create a custom lightning component for showing the weather report.

I am struck in creating a lightning component on a custom object which will show the weather report. Can someone please help?
Hello Everyone,

Can someone please help me in creating a Lightning Component for showing the weather report?
@RestResource(urlMapping = '/OrdermasterUpdate1/*')
global with sharing class OrdermasterUpdate1 {
    string message;
    boolean status;
    id recordID;
    @httpPost
    global static ordermaster__c dopost(){
        OrdermasterUpdate1 response = new OrdermasterUpdate1();
        id productid = null;
        ordermaster__c s3 = new ordermaster__c();
        ordermaster__c s2 = new ordermaster__c();
      RestRequest req = RestContext.request;
      RestResponse res = Restcontext.response;
        Integer i = 0;
               i++;
            i++;
            i++;
            i++;   
            i++;
            i++;
            i++;
            i++;
            i++;
          
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
        string requestBody = restContext.request.requestBody.toString();
        list<ordermasterwrapper> u1 = (list<ordermasterwrapper>)JSON.deserializeStrict(requestBody, list<ordermasterwrapper>.class); 
        for(ordermasterwrapper oi : u1){
            List<ordermaster__c> s = new List<ordermaster__c>();
            s =[select problem_box_number__c,selected_for_process_time__c,selected_for_process_by__c,selected_for_process_box__c,processing_box_number__c,retail_approved_by__c,
        receiveddate__c,transction_id__c,id__c,website_id__c,company_id__c,custom_order_id__c,channel_order_id__c,customer_id__c
        ,customer_name__c,payment_method_name__c,payment_date__c,billing_name__c,billing_company__c,billing_email_address__c,billing_street_address__c,billing_city__c,billing_postcode__c,billing_state__c
        ,billing_country__c,billing_phone__c,billing_fax__c,delivery_name__c,delivery_email_address__c,delivery_street_address__c,delivery_city__c,delivery_postcode__c,delivery_state__c,
         delivery_country__c,delivery_phone__c,shippingdate__c,delivery_fax__c,net_amount__c,shipping_cost__c,paid_amount__c,gross_discount_amount__c,tax_amount__c,order_status__c,currency_code__c,ip_address__c
        ,created_date__c,bonusdate__c,is_mail__c,response_msg__c,send_notes__c,received_amount__c,assign_to__c,assign_wh__c,pay_txnTranID__c,ordertype__c,additionalshiipingtax_amount__c,member_discount__c
        ,cart_discount__c,delivery_father_name__c,delivery_grndfather_name__c,refund_stock__c,doll_to_iqd__c,eqipped_date__c,cancel_date__c,ready_for_shipment__c,is_replacement__c
        ,is_acknowledged__c,not_received_note__c,gen_note__c,gen_note_admin_uid__c,cancel_note__c,cancel_note_admin_uid__c,not_receive_date__c,replace_date__c,ready_to_ship_uid__c,ship_uid__c
        ,receive_uid__c,not_receive_uid__c,replacement_uid__c,is_problem__c,problemdate__c,is_returned__c,is_confirmed__c,returndate__c,replaced_status__c,replacementcount__c,probflag__c
        ,coupon_discount__c,coupon_id__c,shipment_waiting__c,waiting_invoice__c,waiting_reason__c,delivery_user__c,waiting_date__c,notification_send__c,device_token__c,device_type__c
        ,replaced_cancel_note__c,replaced_cancel_note_admin_uid__c,replaced_cancel_date__c,admin_viewed_waiting__c,assembly_confirm__c,remove_from_lottery__c
        ,equipped_cancelled__c,old_order_id__c,old_ship_cost__c,old_gt__c,new_order_id__c,reviews_given__c,points_received__c,points_conversion_value__c,review_points_percentage__c,retail_price__c
        ,retail_installation_price__c,retail_approve_date__c,order_retail_ratio__c,total_retail_emi__c,retail_emi_paid__c,retail_emi_deadline__c,first_retail_payment_date__c
        ,last_retail_payment_date__c,retail_selary__c,down_payment__c,shipping_code__c,shipping_addresses_id__c,neighborhood__c,delevery_name__c,delevery_phonenumber__c,delevery_reason__c
        ,refund_shipping_cost_onreturn__c,delevery_ammont_usd__c,delevery_ammont_iqd__c,received_latitude__c,received_longitude__c from ordermaster__c where id__c =: oi.id];
        if(s.size()>0){ 
                 productid = s.get(0).id;
            s.get(0).transction_id__c = oi.transction_id;
            s.get(0).id__c = oi.id;          
            s.get(0).customer_id__c = oi.customer_id;
            s.get(0).customer_name__c = oi.customer_name;
            s.get(0).payment_method_name__c = oi.payment_method_name;
            s.get(0).payment_date__c = oi.payment_date;
            s.get(0).billing_name__c = oi.billing_name;
            s.get(0).billing_company__c = oi.billing_company;
            s.get(0).billing_email_address__c = oi.billing_email_address;
            s.get(0).billing_street_address__c = oi.billing_street_address;
            s.get(0).billing_city__c = oi.billing_city;
            s.get(0).billing_postcode__c = oi.billing_postcode;
            s.get(0).billing_state__c = oi.billing_state;
            s.get(0).billing_country__c = oi.billing_country;
            s.get(0).billing_phone__c = oi.billing_phone;
            s.get(0).billing_fax__c = oi.billing_fax;
            s.get(0).delivery_name__c = oi.delivery_name;
            s.get(0).delivery_email_address__c = oi.delivery_email_address;
            s.get(0).delivery_street_address__c = oi.delivery_street_address;
            s.get(0).delivery_city__c = oi.delivery_city;
            s.get(0).delivery_postcode__c = oi.delivery_postcode;
            s.get(0).delivery_state__c = oi.delivery_state;
               s.get(0).delivery_country__c = oi.delivery_country;
            s.get(0).delivery_phone__c = oi.delivery_phone;
            s.get(0).shippingdate__c = oi.shippingdate;
            s.get(0).delivery_fax__c = oi.delivery_fax;
            s.get(0).net_amount__c = oi.net_amount;
            s.get(0).shipping_cost__c = oi.shipping_cost;
            s.get(0).paid_amount__c = oi.paid_amount;
            s.get(0).gross_discount_amount__c = oi.gross_discount_amount;
            s.get(0).tax_amount__c = oi.tax_amount;
            s.get(0).order_status__c = oi.order_status;
            s.get(0).currency_code__c = oi.currency_code;
            s.get(0).ip_address__c = oi.ip_address;
            s.get(0).created_date__c = oi.created_date;
            s.get(0).problem_box_number__c = oi.problem_box_number;
                try{
                update s.get(0);
                response.status=true;
                response.message='Product Updated Successfully';
            }catch(exception e){
                response.status=false; 
                response.message = 'Failed';
            }
            
            }else{
                 ordermaster__c o1 = new ordermaster__c();
            o1.transction_id__c = oi.transction_id;
            o1.id__c = oi.id;
            o1.website_id__c = oi.website_id;
            o1.company_id__c = oi.company_id;
            o1.custom_order_id__c = oi.custom_order_id;
            o1.channel_order_id__c = oi.channel_order_id;
            o1.customer_id__c = oi.customer_id;
            o1.delivery_name__c = oi.delivery_name;
            o1.delivery_email_address__c = oi.delivery_email_address;
            o1.delivery_street_address__c = oi.delivery_street_address;
            o1.delivery_city__c = oi.delivery_city;
            o1.delivery_postcode__c = oi.delivery_postcode;
            o1.delivery_state__c = oi.delivery_state;       
            o1.gross_discount_amount__c = oi.gross_discount_amount;   
            o1.response_msg__c = oi.response_msg;
            o1.send_notes__c = oi.send_notes;
            o1.received_amount__c = oi.received_amount;
            o1.assign_to__c = oi.assign_to;
            o1.assign_wh__c = oi.assign_wh;
            o1.pay_txnTranID__c = oi.pay_txnTranID;
            o1.ordertype__c = oi.ordertype;
            o1.additionalshiipingtax_amount__c = oi.additionalshiipingtax_amount;
            o1.member_discount__c = oi.member_discount;
            o1.cart_discount__c = oi.cart_discount;
            o1.delivery_father_name__c = oi.delivery_father_name;
            o1.delivery_grndfather_name__c = oi.delivery_grndfather_name;
            o1.refund_stock__c = oi.refund_stock;
            o1.doll_to_iqd__c = oi.doll_to_iqd;
            o1.eqipped_date__c = oi.eqipped_date;
            o1.cancel_date__c = oi.cancel_date;
            o1.ready_for_shipment__c = oi.ready_for_shipment;
            o1.is_replacement__c = oi.is_replacement;
            o1.is_acknowledged__c = oi.is_acknowledged;
            o1.replaced_cancel_note__c = oi.replaced_cancel_note;
            o1.replaced_cancel_note_admin_uid__c = oi.replaced_cancel_note_admin_uid;
              o1.replaced_cancel_date__c = oi.replaced_cancel_date;
            o1.admin_viewed_waiting__c = oi.admin_viewed_waiting;
            o1.assembly_confirm__c = oi.assembly_confirm;
            o1.remove_from_lottery__c = oi.remove_from_lottery;
                o1.selected_for_process_time__c = oi.selected_for_process_time;
                o1.problem_box_number__c = oi.problem_box_number;
            try{
                insert o1;
                response.status=true;
                response.message='Product Updated Successfully';
            }catch(exception e){
                response.status=false; 
                response.message = 'Failed';
            }
   
        }
            }
         return s3;
        
    }
    global class ordermasterwrapper{
        public double problem_box_number{get;set;}
        public datetime selected_for_process_time{get;set;}
        public integer selected_for_process_by{get;set;}
        public integer selected_for_process_box{get;set;}
        public double processing_box_number{get;set;}
        public double retail_approved_by{get;set;}
        public datetime receiveddate{get;set;}
        public string transction_id{get;set;}
        public double id{get;set;}
        public double website_id{get;set;}
        public double company_id{get;set;}
        public string custom_order_id{get;set;}
        public string channel_order_id{get;set;}
        public integer customer_id{get;set;}
        public string customer_name{get;set;}
        public string payment_method_name{get;set;}
        public datetime payment_date{get;set;}
        public string billing_name{get;set;}
        public string billing_company{get;set;}
        public string billing_email_address{get;set;}
        public string billing_street_address{get;set;}
        public double billing_city{get;set;}
        public string billing_postcode{get;set;}
        public string billing_state{get;set;}
        public integer billing_country{get;set;}
        public string billing_phone{get;set;}
        public string billing_fax{get;set;}
        public string delivery_name{get;set;}
        public string delivery_email_address{get;set;}
        public string delivery_street_address{get;set;}
        public integer delivery_city{get;set;}
        public string delivery_postcode{get;set;}
        public string delivery_state{get;set;}
        public integer delivery_country{get;set;}
        public string delivery_phone{get;set;}
        public datetime shippingdate{get;set;}
        public string delivery_fax{get;set;}
        public double net_amount{get;set;}
        public double shipping_cost{get;set;}
        public double paid_amount{get;set;}
        public double gross_discount_amount{get;set;}
        public double tax_amount{get;set;}
        public integer order_status{get;set;}
        public string currency_code{get;set;}
        public string ip_address{get;set;}
        public datetime created_date{get;set;}
        public datetime bonusdate{get;set;}
        public double is_mail{get;set;}
        public string response_msg{get;set;}
        public string send_notes{get;set;}
        public decimal received_amount{get;set;}
        public integer assign_to{get;set;}
        public integer assign_wh{get;set;}
        public string pay_txnTranID{get;set;}
        public string ordertype{get;set;}
        public decimal additionalshiipingtax_amount{get;set;}
        public decimal member_discount{get;set;}
        public decimal cart_discount{get;set;}
        public string delivery_father_name{get;set;}
        public string delivery_grndfather_name{get;set;}
        public integer refund_stock{get;set;}
        public decimal doll_to_iqd{get;set;}
        public datetime eqipped_date{get;set;}
        public datetime cancel_date{get;set;}
        public datetime ready_for_shipment{get;set;}
        public integer is_replacement{get;set;}
        public integer is_acknowledged{get;set;}
        public string not_received_note{get;set;}
        public string gen_note{get;set;}
        public double gen_note_admin_uid{get;set;}
        public string cancel_note{get;set;}
        public double cancel_note_admin_uid{get;set;}
        public datetime not_receive_date{get;set;}
        public datetime replace_date{get;set;}
        public double ready_to_ship_uid{get;set;}
        public double ship_uid{get;set;}
        public double receive_uid{get;set;}
        public double not_receive_uid{get;set;}
        public double replacement_uid{get;set;}
        public integer is_problem{get;set;}
        public datetime problemdate{get;set;}
        public integer is_returned{get;set;}
        public integer is_confirmed{get;set;}
        public datetime returndate{get;set;}
        public integer replaced_status{get;set;}
        public integer replacementcount{get;set;}
        public integer probflag{get;set;}
        public decimal coupon_discount{get;set;}
        public double coupon_id{get;set;}
        public integer shipment_waiting{get;set;}
        public double waiting_invoice{get;set;}
        public string waiting_reason{get;set;}
        public double delivery_user{get;set;}
        public datetime waiting_date{get;set;}
        public integer notification_send{get;set;}
        public string device_token{get;set;}
        public string device_type{get;set;}
        public string replaced_cancel_note{get;set;}
        public double replaced_cancel_note_admin_uid{get;set;}
        public datetime replaced_cancel_date{get;set;}
        public integer admin_viewed_waiting{get;set;}
        public integer assembly_confirm{get;set;}
        public integer remove_from_lottery{get;set;}
        public integer equipped_cancelled{get;set;}
        public integer old_order_id{get;set;}
        public decimal old_ship_cost{get;set;}
        public decimal old_gt{get;set;}
        public double new_order_id{get;set;}
        public integer reviews_given{get;set;}
        public integer points_received{get;set;}
        public integer points_conversion_value{get;set;}
        public integer review_points_percentage{get;set;}
        public decimal retail_price{get;set;}
        public decimal retail_installation_price{get;set;}
        public datetime retail_approve_date{get;set;}
        public integer order_retail_ratio{get;set;}
        public integer total_retail_emi{get;set;}
        public integer retail_emi_paid{get;set;}
        public datetime retail_emi_deadline{get;set;}
        public datetime first_retail_payment_date{get;set;}
        public datetime last_retail_payment_date{get;set;}
        public string retail_selary{get;set;}    
        public decimal down_payment{get;set;}
        public string shipping_code{get;set;}
        public integer shipping_addresses_id{get;set;}
        public integer neighborhood{get;set;}
        public string delevery_name{get;set;}
        public string delevery_phonenumber{get;set;}
        public string delevery_reason{get;set;}
        public integer refund_shipping_cost_onreturn{get;set;}
        public integer delevery_ammont_usd{get;set;}
        public integer delevery_ammont_iqd{get;set;}
        public string received_latitude{get;set;}
        public string received_longitude{get;set;}
    }
}

 
@RestResource(urlMapping = '/OrdermasterUpdate1/*')
global with sharing class OrdermasterUpdate1 {
    string message;
    boolean status;
    id recordID;
    @httpPost
    global static ordermaster__c dopost(){
        OrdermasterUpdate1 response = new OrdermasterUpdate1();
        id productid = null;
        ordermaster__c s3 = new ordermaster__c();
        ordermaster__c s2 = new ordermaster__c();
      RestRequest req = RestContext.request;
      RestResponse res = Restcontext.response;
        Integer i = 0;
               i++;
            i++;
            i++;
            i++;   
            i++;
            i++;
            i++;
            i++;
            i++;
          
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
        string requestBody = restContext.request.requestBody.toString();
        list<ordermasterwrapper> u1 = (list<ordermasterwrapper>)JSON.deserializeStrict(requestBody, list<ordermasterwrapper>.class); 
        for(ordermasterwrapper oi : u1){
            List<ordermaster__c> s = new List<ordermaster__c>();
            s =[select problem_box_number__c,selected_for_process_time__c,selected_for_process_by__c,selected_for_process_box__c,processing_box_number__c,retail_approved_by__c,
        receiveddate__c,transction_id__c,id__c,website_id__c,company_id__c,custom_order_id__c,channel_order_id__c,customer_id__c
        ,customer_name__c,payment_method_name__c,payment_date__c,billing_name__c,billing_company__c,billing_email_address__c,billing_street_address__c,billing_city__c,billing_postcode__c,billing_state__c
        ,billing_country__c,billing_phone__c,billing_fax__c,delivery_name__c,delivery_email_address__c,delivery_street_address__c,delivery_city__c,delivery_postcode__c,delivery_state__c,
         delivery_country__c,delivery_phone__c,shippingdate__c,delivery_fax__c,net_amount__c,shipping_cost__c,paid_amount__c,gross_discount_amount__c,tax_amount__c,order_status__c,currency_code__c,ip_address__c
        ,created_date__c,bonusdate__c,is_mail__c,response_msg__c,send_notes__c,received_amount__c,assign_to__c,assign_wh__c,pay_txnTranID__c,ordertype__c,additionalshiipingtax_amount__c,member_discount__c
        ,cart_discount__c,delivery_father_name__c,delivery_grndfather_name__c,refund_stock__c,doll_to_iqd__c,eqipped_date__c,cancel_date__c,ready_for_shipment__c,is_replacement__c
        ,is_acknowledged__c,not_received_note__c,gen_note__c,gen_note_admin_uid__c,cancel_note__c,cancel_note_admin_uid__c,not_receive_date__c,replace_date__c,ready_to_ship_uid__c,ship_uid__c
        ,receive_uid__c,not_receive_uid__c,replacement_uid__c,is_problem__c,problemdate__c,is_returned__c,is_confirmed__c,returndate__c,replaced_status__c,replacementcount__c,probflag__c
        ,coupon_discount__c,coupon_id__c,shipment_waiting__c,waiting_invoice__c,waiting_reason__c,delivery_user__c,waiting_date__c,notification_send__c,device_token__c,device_type__c
        ,replaced_cancel_note__c,replaced_cancel_note_admin_uid__c,replaced_cancel_date__c,admin_viewed_waiting__c,assembly_confirm__c,remove_from_lottery__c
        ,equipped_cancelled__c,old_order_id__c,old_ship_cost__c,old_gt__c,new_order_id__c,reviews_given__c,points_received__c,points_conversion_value__c,review_points_percentage__c,retail_price__c
        ,retail_installation_price__c,retail_approve_date__c,order_retail_ratio__c,total_retail_emi__c,retail_emi_paid__c,retail_emi_deadline__c,first_retail_payment_date__c
        ,last_retail_payment_date__c,retail_selary__c,down_payment__c,shipping_code__c,shipping_addresses_id__c,neighborhood__c,delevery_name__c,delevery_phonenumber__c,delevery_reason__c
        ,refund_shipping_cost_onreturn__c,delevery_ammont_usd__c,delevery_ammont_iqd__c,received_latitude__c,received_longitude__c from ordermaster__c where id__c =: oi.id];
        if(s.size()>0){ 
                 productid = s.get(0).id;
            s.get(0).transction_id__c = oi.transction_id;
            s.get(0).id__c = oi.id;          
            s.get(0).customer_id__c = oi.customer_id;
            s.get(0).customer_name__c = oi.customer_name;
            s.get(0).payment_method_name__c = oi.payment_method_name;
            s.get(0).payment_date__c = oi.payment_date;
            s.get(0).billing_name__c = oi.billing_name;
            s.get(0).billing_company__c = oi.billing_company;
            s.get(0).billing_email_address__c = oi.billing_email_address;
            s.get(0).billing_street_address__c = oi.billing_street_address;
            s.get(0).billing_city__c = oi.billing_city;
            s.get(0).billing_postcode__c = oi.billing_postcode;
            s.get(0).billing_state__c = oi.billing_state;
            s.get(0).billing_country__c = oi.billing_country;
            s.get(0).billing_phone__c = oi.billing_phone;
            s.get(0).billing_fax__c = oi.billing_fax;
            s.get(0).delivery_name__c = oi.delivery_name;
            s.get(0).delivery_email_address__c = oi.delivery_email_address;
            s.get(0).delivery_street_address__c = oi.delivery_street_address;
            s.get(0).delivery_city__c = oi.delivery_city;
            s.get(0).delivery_postcode__c = oi.delivery_postcode;
            s.get(0).delivery_state__c = oi.delivery_state;
               s.get(0).delivery_country__c = oi.delivery_country;
            s.get(0).delivery_phone__c = oi.delivery_phone;
            s.get(0).shippingdate__c = oi.shippingdate;
            s.get(0).delivery_fax__c = oi.delivery_fax;
            s.get(0).net_amount__c = oi.net_amount;
            s.get(0).shipping_cost__c = oi.shipping_cost;
            s.get(0).paid_amount__c = oi.paid_amount;
            s.get(0).gross_discount_amount__c = oi.gross_discount_amount;
            s.get(0).tax_amount__c = oi.tax_amount;
            s.get(0).order_status__c = oi.order_status;
            s.get(0).currency_code__c = oi.currency_code;
            s.get(0).ip_address__c = oi.ip_address;
            s.get(0).created_date__c = oi.created_date;
            s.get(0).problem_box_number__c = oi.problem_box_number;
                try{
                update s.get(0);
                response.status=true;
                response.message='Product Updated Successfully';
            }catch(exception e){
                response.status=false; 
                response.message = 'Failed';
            }
            
            }else{
                 ordermaster__c o1 = new ordermaster__c();
            o1.transction_id__c = oi.transction_id;
            o1.id__c = oi.id;
            o1.website_id__c = oi.website_id;
            o1.company_id__c = oi.company_id;
            o1.custom_order_id__c = oi.custom_order_id;
            o1.channel_order_id__c = oi.channel_order_id;
            o1.customer_id__c = oi.customer_id;
            o1.delivery_name__c = oi.delivery_name;
            o1.delivery_email_address__c = oi.delivery_email_address;
            o1.delivery_street_address__c = oi.delivery_street_address;
            o1.delivery_city__c = oi.delivery_city;
            o1.delivery_postcode__c = oi.delivery_postcode;
            o1.delivery_state__c = oi.delivery_state;       
            o1.gross_discount_amount__c = oi.gross_discount_amount;   
            o1.response_msg__c = oi.response_msg;
            o1.send_notes__c = oi.send_notes;
            o1.received_amount__c = oi.received_amount;
            o1.assign_to__c = oi.assign_to;
            o1.assign_wh__c = oi.assign_wh;
            o1.pay_txnTranID__c = oi.pay_txnTranID;
            o1.ordertype__c = oi.ordertype;
            o1.additionalshiipingtax_amount__c = oi.additionalshiipingtax_amount;
            o1.member_discount__c = oi.member_discount;
            o1.cart_discount__c = oi.cart_discount;
            o1.delivery_father_name__c = oi.delivery_father_name;
            o1.delivery_grndfather_name__c = oi.delivery_grndfather_name;
            o1.refund_stock__c = oi.refund_stock;
            o1.doll_to_iqd__c = oi.doll_to_iqd;
            o1.eqipped_date__c = oi.eqipped_date;
            o1.cancel_date__c = oi.cancel_date;
            o1.ready_for_shipment__c = oi.ready_for_shipment;
            o1.is_replacement__c = oi.is_replacement;
            o1.is_acknowledged__c = oi.is_acknowledged;
            o1.replaced_cancel_note__c = oi.replaced_cancel_note;
            o1.replaced_cancel_note_admin_uid__c = oi.replaced_cancel_note_admin_uid;
              o1.replaced_cancel_date__c = oi.replaced_cancel_date;
            o1.admin_viewed_waiting__c = oi.admin_viewed_waiting;
            o1.assembly_confirm__c = oi.assembly_confirm;
            o1.remove_from_lottery__c = oi.remove_from_lottery;
                o1.selected_for_process_time__c = oi.selected_for_process_time;
                o1.problem_box_number__c = oi.problem_box_number;
            try{
                insert o1;
                response.status=true;
                response.message='Product Updated Successfully';
            }catch(exception e){
                response.status=false; 
                response.message = 'Failed';
            }
   
        }
            }
         return s3;
        
    }
    global class ordermasterwrapper{
        public double problem_box_number{get;set;}
        public datetime selected_for_process_time{get;set;}
        public integer selected_for_process_by{get;set;}
        public integer selected_for_process_box{get;set;}
        public double processing_box_number{get;set;}
        public double retail_approved_by{get;set;}
        public datetime receiveddate{get;set;}
        public string transction_id{get;set;}
        public double id{get;set;}
        public double website_id{get;set;}
        public double company_id{get;set;}
        public string custom_order_id{get;set;}
        public string channel_order_id{get;set;}
        public integer customer_id{get;set;}
        public string customer_name{get;set;}
        public string payment_method_name{get;set;}
        public datetime payment_date{get;set;}
        public string billing_name{get;set;}
        public string billing_company{get;set;}
        public string billing_email_address{get;set;}
        public string billing_street_address{get;set;}
        public double billing_city{get;set;}
        public string billing_postcode{get;set;}
        public string billing_state{get;set;}
        public integer billing_country{get;set;}
        public string billing_phone{get;set;}
        public string billing_fax{get;set;}
        public string delivery_name{get;set;}
        public string delivery_email_address{get;set;}
        public string delivery_street_address{get;set;}
        public integer delivery_city{get;set;}
        public string delivery_postcode{get;set;}
        public string delivery_state{get;set;}
        public integer delivery_country{get;set;}
        public string delivery_phone{get;set;}
        public datetime shippingdate{get;set;}
        public string delivery_fax{get;set;}
        public double net_amount{get;set;}
        public double shipping_cost{get;set;}
        public double paid_amount{get;set;}
        public double gross_discount_amount{get;set;}
        public double tax_amount{get;set;}
        public integer order_status{get;set;}
        public string currency_code{get;set;}
        public string ip_address{get;set;}
        public datetime created_date{get;set;}
        public datetime bonusdate{get;set;}
        public double is_mail{get;set;}
        public string response_msg{get;set;}
        public string send_notes{get;set;}
        public decimal received_amount{get;set;}
        public integer assign_to{get;set;}
        public integer assign_wh{get;set;}
        public string pay_txnTranID{get;set;}
        public string ordertype{get;set;}
        public decimal additionalshiipingtax_amount{get;set;}
        public decimal member_discount{get;set;}
        public decimal cart_discount{get;set;}
        public string delivery_father_name{get;set;}
        public string delivery_grndfather_name{get;set;}
        public integer refund_stock{get;set;}
        public decimal doll_to_iqd{get;set;}
        public datetime eqipped_date{get;set;}
        public datetime cancel_date{get;set;}
        public datetime ready_for_shipment{get;set;}
        public integer is_replacement{get;set;}
        public integer is_acknowledged{get;set;}
        public string not_received_note{get;set;}
        public string gen_note{get;set;}
        public double gen_note_admin_uid{get;set;}
        public string cancel_note{get;set;}
        public double cancel_note_admin_uid{get;set;}
        public datetime not_receive_date{get;set;}
        public datetime replace_date{get;set;}
        public double ready_to_ship_uid{get;set;}
        public double ship_uid{get;set;}
        public double receive_uid{get;set;}
        public double not_receive_uid{get;set;}
        public double replacement_uid{get;set;}
        public integer is_problem{get;set;}
        public datetime problemdate{get;set;}
        public integer is_returned{get;set;}
        public integer is_confirmed{get;set;}
        public datetime returndate{get;set;}
        public integer replaced_status{get;set;}
        public integer replacementcount{get;set;}
        public integer probflag{get;set;}
        public decimal coupon_discount{get;set;}
        public double coupon_id{get;set;}
        public integer shipment_waiting{get;set;}
        public double waiting_invoice{get;set;}
        public string waiting_reason{get;set;}
        public double delivery_user{get;set;}
        public datetime waiting_date{get;set;}
        public integer notification_send{get;set;}
        public string device_token{get;set;}
        public string device_type{get;set;}
        public string replaced_cancel_note{get;set;}
        public double replaced_cancel_note_admin_uid{get;set;}
        public datetime replaced_cancel_date{get;set;}
        public integer admin_viewed_waiting{get;set;}
        public integer assembly_confirm{get;set;}
        public integer remove_from_lottery{get;set;}
        public integer equipped_cancelled{get;set;}
        public integer old_order_id{get;set;}
        public decimal old_ship_cost{get;set;}
        public decimal old_gt{get;set;}
        public double new_order_id{get;set;}
        public integer reviews_given{get;set;}
        public integer points_received{get;set;}
        public integer points_conversion_value{get;set;}
        public integer review_points_percentage{get;set;}
        public decimal retail_price{get;set;}
        public decimal retail_installation_price{get;set;}
        public datetime retail_approve_date{get;set;}
        public integer order_retail_ratio{get;set;}
        public integer total_retail_emi{get;set;}
        public integer retail_emi_paid{get;set;}
        public datetime retail_emi_deadline{get;set;}
        public datetime first_retail_payment_date{get;set;}
        public datetime last_retail_payment_date{get;set;}
        public string retail_selary{get;set;}    
        public decimal down_payment{get;set;}
        public string shipping_code{get;set;}
        public integer shipping_addresses_id{get;set;}
        public integer neighborhood{get;set;}
        public string delevery_name{get;set;}
        public string delevery_phonenumber{get;set;}
        public string delevery_reason{get;set;}
        public integer refund_shipping_cost_onreturn{get;set;}
        public integer delevery_ammont_usd{get;set;}
        public integer delevery_ammont_iqd{get;set;}
        public string received_latitude{get;set;}
        public string received_longitude{get;set;}
    }
}

Can someone please help in understanding how field mapping is done while integrating with SoapAPI in Apex code.

 

Actually, there is an integration already done using Salesforce and Propertyware API ( a third party tool) using SOAP API and I can see the GET method used in the Apex code. However, I am unable to find the field mapping done in the Apex code to fix the issue as some of the values in the field are not coming correct.

 

Thanks!!

Hello folks,  

I am trying to insert more than 6,000 records using Data Loader on Lead Object. However, I am getting an error of Duplicate rule written on my Lead object as the Duplicate rule is not allowing these Duplicate entries. Is there any way around to insert duplicate data in my Lead object using "Data Loader". 

Thanks in Advance!!!

I am trying to develop a Lightning Component which will display the weather report. I am sending the request to the server and I am also getting success response. However, I am not getting the weather report on my Lightning Component.
Hello Everyone,

Can someone please help me in creating a Lightning Component for showing the weather report?
@RestResource(urlMapping = '/OrdermasterUpdate1/*')
global with sharing class OrdermasterUpdate1 {
    string message;
    boolean status;
    id recordID;
    @httpPost
    global static ordermaster__c dopost(){
        OrdermasterUpdate1 response = new OrdermasterUpdate1();
        id productid = null;
        ordermaster__c s3 = new ordermaster__c();
        ordermaster__c s2 = new ordermaster__c();
      RestRequest req = RestContext.request;
      RestResponse res = Restcontext.response;
        Integer i = 0;
               i++;
            i++;
            i++;
            i++;   
            i++;
            i++;
            i++;
            i++;
            i++;
          
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
            i++;
        string requestBody = restContext.request.requestBody.toString();
        list<ordermasterwrapper> u1 = (list<ordermasterwrapper>)JSON.deserializeStrict(requestBody, list<ordermasterwrapper>.class); 
        for(ordermasterwrapper oi : u1){
            List<ordermaster__c> s = new List<ordermaster__c>();
            s =[select problem_box_number__c,selected_for_process_time__c,selected_for_process_by__c,selected_for_process_box__c,processing_box_number__c,retail_approved_by__c,
        receiveddate__c,transction_id__c,id__c,website_id__c,company_id__c,custom_order_id__c,channel_order_id__c,customer_id__c
        ,customer_name__c,payment_method_name__c,payment_date__c,billing_name__c,billing_company__c,billing_email_address__c,billing_street_address__c,billing_city__c,billing_postcode__c,billing_state__c
        ,billing_country__c,billing_phone__c,billing_fax__c,delivery_name__c,delivery_email_address__c,delivery_street_address__c,delivery_city__c,delivery_postcode__c,delivery_state__c,
         delivery_country__c,delivery_phone__c,shippingdate__c,delivery_fax__c,net_amount__c,shipping_cost__c,paid_amount__c,gross_discount_amount__c,tax_amount__c,order_status__c,currency_code__c,ip_address__c
        ,created_date__c,bonusdate__c,is_mail__c,response_msg__c,send_notes__c,received_amount__c,assign_to__c,assign_wh__c,pay_txnTranID__c,ordertype__c,additionalshiipingtax_amount__c,member_discount__c
        ,cart_discount__c,delivery_father_name__c,delivery_grndfather_name__c,refund_stock__c,doll_to_iqd__c,eqipped_date__c,cancel_date__c,ready_for_shipment__c,is_replacement__c
        ,is_acknowledged__c,not_received_note__c,gen_note__c,gen_note_admin_uid__c,cancel_note__c,cancel_note_admin_uid__c,not_receive_date__c,replace_date__c,ready_to_ship_uid__c,ship_uid__c
        ,receive_uid__c,not_receive_uid__c,replacement_uid__c,is_problem__c,problemdate__c,is_returned__c,is_confirmed__c,returndate__c,replaced_status__c,replacementcount__c,probflag__c
        ,coupon_discount__c,coupon_id__c,shipment_waiting__c,waiting_invoice__c,waiting_reason__c,delivery_user__c,waiting_date__c,notification_send__c,device_token__c,device_type__c
        ,replaced_cancel_note__c,replaced_cancel_note_admin_uid__c,replaced_cancel_date__c,admin_viewed_waiting__c,assembly_confirm__c,remove_from_lottery__c
        ,equipped_cancelled__c,old_order_id__c,old_ship_cost__c,old_gt__c,new_order_id__c,reviews_given__c,points_received__c,points_conversion_value__c,review_points_percentage__c,retail_price__c
        ,retail_installation_price__c,retail_approve_date__c,order_retail_ratio__c,total_retail_emi__c,retail_emi_paid__c,retail_emi_deadline__c,first_retail_payment_date__c
        ,last_retail_payment_date__c,retail_selary__c,down_payment__c,shipping_code__c,shipping_addresses_id__c,neighborhood__c,delevery_name__c,delevery_phonenumber__c,delevery_reason__c
        ,refund_shipping_cost_onreturn__c,delevery_ammont_usd__c,delevery_ammont_iqd__c,received_latitude__c,received_longitude__c from ordermaster__c where id__c =: oi.id];
        if(s.size()>0){ 
                 productid = s.get(0).id;
            s.get(0).transction_id__c = oi.transction_id;
            s.get(0).id__c = oi.id;          
            s.get(0).customer_id__c = oi.customer_id;
            s.get(0).customer_name__c = oi.customer_name;
            s.get(0).payment_method_name__c = oi.payment_method_name;
            s.get(0).payment_date__c = oi.payment_date;
            s.get(0).billing_name__c = oi.billing_name;
            s.get(0).billing_company__c = oi.billing_company;
            s.get(0).billing_email_address__c = oi.billing_email_address;
            s.get(0).billing_street_address__c = oi.billing_street_address;
            s.get(0).billing_city__c = oi.billing_city;
            s.get(0).billing_postcode__c = oi.billing_postcode;
            s.get(0).billing_state__c = oi.billing_state;
            s.get(0).billing_country__c = oi.billing_country;
            s.get(0).billing_phone__c = oi.billing_phone;
            s.get(0).billing_fax__c = oi.billing_fax;
            s.get(0).delivery_name__c = oi.delivery_name;
            s.get(0).delivery_email_address__c = oi.delivery_email_address;
            s.get(0).delivery_street_address__c = oi.delivery_street_address;
            s.get(0).delivery_city__c = oi.delivery_city;
            s.get(0).delivery_postcode__c = oi.delivery_postcode;
            s.get(0).delivery_state__c = oi.delivery_state;
               s.get(0).delivery_country__c = oi.delivery_country;
            s.get(0).delivery_phone__c = oi.delivery_phone;
            s.get(0).shippingdate__c = oi.shippingdate;
            s.get(0).delivery_fax__c = oi.delivery_fax;
            s.get(0).net_amount__c = oi.net_amount;
            s.get(0).shipping_cost__c = oi.shipping_cost;
            s.get(0).paid_amount__c = oi.paid_amount;
            s.get(0).gross_discount_amount__c = oi.gross_discount_amount;
            s.get(0).tax_amount__c = oi.tax_amount;
            s.get(0).order_status__c = oi.order_status;
            s.get(0).currency_code__c = oi.currency_code;
            s.get(0).ip_address__c = oi.ip_address;
            s.get(0).created_date__c = oi.created_date;
            s.get(0).problem_box_number__c = oi.problem_box_number;
                try{
                update s.get(0);
                response.status=true;
                response.message='Product Updated Successfully';
            }catch(exception e){
                response.status=false; 
                response.message = 'Failed';
            }
            
            }else{
                 ordermaster__c o1 = new ordermaster__c();
            o1.transction_id__c = oi.transction_id;
            o1.id__c = oi.id;
            o1.website_id__c = oi.website_id;
            o1.company_id__c = oi.company_id;
            o1.custom_order_id__c = oi.custom_order_id;
            o1.channel_order_id__c = oi.channel_order_id;
            o1.customer_id__c = oi.customer_id;
            o1.delivery_name__c = oi.delivery_name;
            o1.delivery_email_address__c = oi.delivery_email_address;
            o1.delivery_street_address__c = oi.delivery_street_address;
            o1.delivery_city__c = oi.delivery_city;
            o1.delivery_postcode__c = oi.delivery_postcode;
            o1.delivery_state__c = oi.delivery_state;       
            o1.gross_discount_amount__c = oi.gross_discount_amount;   
            o1.response_msg__c = oi.response_msg;
            o1.send_notes__c = oi.send_notes;
            o1.received_amount__c = oi.received_amount;
            o1.assign_to__c = oi.assign_to;
            o1.assign_wh__c = oi.assign_wh;
            o1.pay_txnTranID__c = oi.pay_txnTranID;
            o1.ordertype__c = oi.ordertype;
            o1.additionalshiipingtax_amount__c = oi.additionalshiipingtax_amount;
            o1.member_discount__c = oi.member_discount;
            o1.cart_discount__c = oi.cart_discount;
            o1.delivery_father_name__c = oi.delivery_father_name;
            o1.delivery_grndfather_name__c = oi.delivery_grndfather_name;
            o1.refund_stock__c = oi.refund_stock;
            o1.doll_to_iqd__c = oi.doll_to_iqd;
            o1.eqipped_date__c = oi.eqipped_date;
            o1.cancel_date__c = oi.cancel_date;
            o1.ready_for_shipment__c = oi.ready_for_shipment;
            o1.is_replacement__c = oi.is_replacement;
            o1.is_acknowledged__c = oi.is_acknowledged;
            o1.replaced_cancel_note__c = oi.replaced_cancel_note;
            o1.replaced_cancel_note_admin_uid__c = oi.replaced_cancel_note_admin_uid;
              o1.replaced_cancel_date__c = oi.replaced_cancel_date;
            o1.admin_viewed_waiting__c = oi.admin_viewed_waiting;
            o1.assembly_confirm__c = oi.assembly_confirm;
            o1.remove_from_lottery__c = oi.remove_from_lottery;
                o1.selected_for_process_time__c = oi.selected_for_process_time;
                o1.problem_box_number__c = oi.problem_box_number;
            try{
                insert o1;
                response.status=true;
                response.message='Product Updated Successfully';
            }catch(exception e){
                response.status=false; 
                response.message = 'Failed';
            }
   
        }
            }
         return s3;
        
    }
    global class ordermasterwrapper{
        public double problem_box_number{get;set;}
        public datetime selected_for_process_time{get;set;}
        public integer selected_for_process_by{get;set;}
        public integer selected_for_process_box{get;set;}
        public double processing_box_number{get;set;}
        public double retail_approved_by{get;set;}
        public datetime receiveddate{get;set;}
        public string transction_id{get;set;}
        public double id{get;set;}
        public double website_id{get;set;}
        public double company_id{get;set;}
        public string custom_order_id{get;set;}
        public string channel_order_id{get;set;}
        public integer customer_id{get;set;}
        public string customer_name{get;set;}
        public string payment_method_name{get;set;}
        public datetime payment_date{get;set;}
        public string billing_name{get;set;}
        public string billing_company{get;set;}
        public string billing_email_address{get;set;}
        public string billing_street_address{get;set;}
        public double billing_city{get;set;}
        public string billing_postcode{get;set;}
        public string billing_state{get;set;}
        public integer billing_country{get;set;}
        public string billing_phone{get;set;}
        public string billing_fax{get;set;}
        public string delivery_name{get;set;}
        public string delivery_email_address{get;set;}
        public string delivery_street_address{get;set;}
        public integer delivery_city{get;set;}
        public string delivery_postcode{get;set;}
        public string delivery_state{get;set;}
        public integer delivery_country{get;set;}
        public string delivery_phone{get;set;}
        public datetime shippingdate{get;set;}
        public string delivery_fax{get;set;}
        public double net_amount{get;set;}
        public double shipping_cost{get;set;}
        public double paid_amount{get;set;}
        public double gross_discount_amount{get;set;}
        public double tax_amount{get;set;}
        public integer order_status{get;set;}
        public string currency_code{get;set;}
        public string ip_address{get;set;}
        public datetime created_date{get;set;}
        public datetime bonusdate{get;set;}
        public double is_mail{get;set;}
        public string response_msg{get;set;}
        public string send_notes{get;set;}
        public decimal received_amount{get;set;}
        public integer assign_to{get;set;}
        public integer assign_wh{get;set;}
        public string pay_txnTranID{get;set;}
        public string ordertype{get;set;}
        public decimal additionalshiipingtax_amount{get;set;}
        public decimal member_discount{get;set;}
        public decimal cart_discount{get;set;}
        public string delivery_father_name{get;set;}
        public string delivery_grndfather_name{get;set;}
        public integer refund_stock{get;set;}
        public decimal doll_to_iqd{get;set;}
        public datetime eqipped_date{get;set;}
        public datetime cancel_date{get;set;}
        public datetime ready_for_shipment{get;set;}
        public integer is_replacement{get;set;}
        public integer is_acknowledged{get;set;}
        public string not_received_note{get;set;}
        public string gen_note{get;set;}
        public double gen_note_admin_uid{get;set;}
        public string cancel_note{get;set;}
        public double cancel_note_admin_uid{get;set;}
        public datetime not_receive_date{get;set;}
        public datetime replace_date{get;set;}
        public double ready_to_ship_uid{get;set;}
        public double ship_uid{get;set;}
        public double receive_uid{get;set;}
        public double not_receive_uid{get;set;}
        public double replacement_uid{get;set;}
        public integer is_problem{get;set;}
        public datetime problemdate{get;set;}
        public integer is_returned{get;set;}
        public integer is_confirmed{get;set;}
        public datetime returndate{get;set;}
        public integer replaced_status{get;set;}
        public integer replacementcount{get;set;}
        public integer probflag{get;set;}
        public decimal coupon_discount{get;set;}
        public double coupon_id{get;set;}
        public integer shipment_waiting{get;set;}
        public double waiting_invoice{get;set;}
        public string waiting_reason{get;set;}
        public double delivery_user{get;set;}
        public datetime waiting_date{get;set;}
        public integer notification_send{get;set;}
        public string device_token{get;set;}
        public string device_type{get;set;}
        public string replaced_cancel_note{get;set;}
        public double replaced_cancel_note_admin_uid{get;set;}
        public datetime replaced_cancel_date{get;set;}
        public integer admin_viewed_waiting{get;set;}
        public integer assembly_confirm{get;set;}
        public integer remove_from_lottery{get;set;}
        public integer equipped_cancelled{get;set;}
        public integer old_order_id{get;set;}
        public decimal old_ship_cost{get;set;}
        public decimal old_gt{get;set;}
        public double new_order_id{get;set;}
        public integer reviews_given{get;set;}
        public integer points_received{get;set;}
        public integer points_conversion_value{get;set;}
        public integer review_points_percentage{get;set;}
        public decimal retail_price{get;set;}
        public decimal retail_installation_price{get;set;}
        public datetime retail_approve_date{get;set;}
        public integer order_retail_ratio{get;set;}
        public integer total_retail_emi{get;set;}
        public integer retail_emi_paid{get;set;}
        public datetime retail_emi_deadline{get;set;}
        public datetime first_retail_payment_date{get;set;}
        public datetime last_retail_payment_date{get;set;}
        public string retail_selary{get;set;}    
        public decimal down_payment{get;set;}
        public string shipping_code{get;set;}
        public integer shipping_addresses_id{get;set;}
        public integer neighborhood{get;set;}
        public string delevery_name{get;set;}
        public string delevery_phonenumber{get;set;}
        public string delevery_reason{get;set;}
        public integer refund_shipping_cost_onreturn{get;set;}
        public integer delevery_ammont_usd{get;set;}
        public integer delevery_ammont_iqd{get;set;}
        public string received_latitude{get;set;}
        public string received_longitude{get;set;}
    }
}

 

Can someone please help in understanding how field mapping is done while integrating with SoapAPI in Apex code.

 

Actually, there is an integration already done using Salesforce and Propertyware API ( a third party tool) using SOAP API and I can see the GET method used in the Apex code. However, I am unable to find the field mapping done in the Apex code to fix the issue as some of the values in the field are not coming correct.

 

Thanks!!

hi,
 can anyone help me to find a way to get current weather report for account records???? 

public class UpdateFieldOnOpportunity implements Schedulable { public List Opp {set; get;} Public List<Insertion__c> Ins { set; get; } public Integer j = 0; public void updateFields() { Opp= [SELECT Id,Name,Account_Name__c, Formula_Video__c, Insertion__c FROM Opportunity WHERE Formula_Video__c > 0 ]; System.debug('*********Opportunities with Formula Video above Zero**********'+ Opp.size()); Ins = [SELECT Account__c,Id,Name,Formula_Video_Flag__c FROM Insertion__c ]; for(Insertion__c i : Ins) { i.Formula_Video_Flag__c = 'FALSE'; } update Ins; for (Insertion__c i : Ins) { System.debug('*******Insertion*********'+i); for(Opportunity o : opp) { if(I.id == o.Insertion__c) I.Formula_Video_Flag__c = 'TRUE'; else I.Formula_Video_Flag__c = 'FALSE'; j++; } System.debug('*******Update*********'); } update Ins; } }

  • October 02, 2013
  • Like
  • 0