• vishal yadav 62
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 8
    Replies
Hi frirnds,

Due to  entered wrong ip ranges my org is blocked so what can i do .right now i'm not able to access my org .i tried forgate password but not success..

please help me out as soon as possible 
 
Hi folk,

year is coming like this type 2,009.   i don't want comma .in data base int(10) . which was in php .so i created field year__c and taken data type -number. 
if i'm taken data type text then (comma) is not coming . but i need year data type number without comma 
Result ---2009

pls help me out 
 
Hi folks,

i want write php due to apex with @RemoteAction ..getting error .
code is below --2 code for refernce 
please help me out asap
1st--
public function setExShowroomPrice ()
    {
        $manufacturer = $this->input->post('old_car_manufacturer');
        $model = $this->input->post('old_car_model');
        $variant = explode('@@', $this->input->post('old_car_modeltype'));
           $model_type = $variant[0];
           $fuel_type = $variant[1];
        $result = $this->cardata_model->get_used_car_det($manufacturer,$model,$model_type,$fuel_type,$_SESSION['dlrid']);
        
        if (is_array($result))
        {
            $_SESSION['old_ex_showroom_price'] = $result['ex_showroom_price'];
            $var_price = array("ex_showroom_price"=>$result['ex_showroom_price'],"fuel_type"=>$result['fuel_type']);
            echo json_encode($var_price);
        }
    }
    
    ---------------------
2nd---
function get_used_car_det($manufacturer,$model,$model_type,$fuel_type,$dealer_id)
    {
        $conditions = array(
            'manufacturer' => $manufacturer,
            'model' => $model,        
            'model_type' => $model_type,
            'fuel_type'=>$fuel_type,
            'city'=>$_SESSION['dlr_city']
        );
        $this->db->select('*');
        $this->db->where($conditions);
        $query = $this->db->get('old_cars');
        //echo $this->db->last_query();
        if ($query->num_rows() > 0) return $query->row_array();
        else return false; 
       
    }

===================
this is mine code 
global with sharing class ExchangeRemoter {

    public static string manufacturer {get; set;}
   //public static jud_old_car {get;set;}
   public static list<jud_old_cars__c> oldCar {get; set;}
   public Map<String, String> showrooms {get; set;}
    
    
    public ExchangeRemoter() {
        
    }
    
    @RemoteAction
    global static list<Map<string, string>> get_car_manufacturer(){
        list<Map<string, string>> oldCarList = new list<Map<String, String>>();
        AggregateResult[] groupedResults = [Select manufacturer__c from jud_old_cars__c group by manufacturer__c];
        system.debug(groupedResults);
        
        for(AggregateResult ar : groupedResults){
                
           oldCarList.add(new Map<String, String> { 
                                                     'value'=>String.valueof(ar.get('manufacturer__c')),
                                                     'label'=>String.valueof(ar.get('manufacturer__c'))
                                                 });  
     
        }   
      
        return oldCarList;
    }
    
    @RemoteAction
    global  static list<Map<string, string>> get_model(String manufac){
        list<Map<string, string>> carmodels = new list<Map<String, String>>();    
        AggregateResult[] groupedResult = [Select model__c from jud_old_cars__c where manufacturer__c =: manufac group by model__c];
        for(AggregateResult cm : groupedResult){
            carmodels.add(new Map<String, String> { 
                                                     'value'=>String.valueof(cm.get('model__c')),
                                                     'label'=>String.valueof(cm.get('model__c'))
                                                 });   
        }
        return carmodels;
    }
    
    @RemoteAction
    global static list<Map<string, string>> get_variant(string model){
      
        list<Map<string, string>> oldVariantList = new list<Map<String, String>>();
        AggregateResult[] groupedResults = [Select model_type__c, fuel_type__c
                                            from jud_old_cars__c
                                            where model__c=: model
                                            group by model_type__c, fuel_type__c];
        
        for(AggregateResult ar : groupedResults){
                
           oldVariantList.add(new Map<String, String> { 
                                                     'value'=>String.valueof(ar.get('model_type__c'))+ '@@'+ String.valueof(ar.get('fuel_type__c')),
                                                     'label'=>String.valueof(ar.get('model_type__c'))+ ' ' + String.valueof(ar.get('fuel_type__c'))
                                                 });  
     
        }   
      
        return oldVariantList;
    }
  
    @RemoteAction
     global static list<Map<string, string>> setExShowroomPrice(Map<String, String> showrooms){
       list<Map<string, string>> carmodelsprice = new list<Map<String, String>>(); 
       List<String> models = new List<String>(); 
        
        String Exshoroom;
        Integer showroompri = Integer.valueOf(showrooms.get('showroompri'));
        String manufacturer = showrooms.get('manufacturer');
        String mode = showrooms.get('model');
        String  variant = showrooms.get('variant');
         
         AggregateResult[] groupedResults = [Select manufacturer__c,model__c,fuel_type__c from jud_old_cars__c]
        list<Map<string, string>> oldVariantList = new list<Map<String, String>>();
                 
        for(AggregateResult sesp : groupedResults){
        
                carmodelsprice.add(new Map<String, String>{
            
                }
    }
        ExShowroomPriceList.add(new Map<String, String> {  
                                                    'manufacturer'=>oldCarList.manufacturer__c,
                                                    'model'=>carmodelsprice.model__c,                                                                   
                                                    'variant'=>carmodelsprice.variant__c,
                                                    'model_type'=>carmodelsprice.model_type__C,
                                                    'fuel_type'=>carmodelsprice.fuel_type__c,
                                                                                                                                                           
                                                  });
              }
    
    return carmodelsprice;
}
}
.help me out friend
Hi folks,

i want to create cookies in salesforce by @RemoteAction.

 
Hi,
this is code in php 

function get_car_manufacturer()
    {
        $data['car_manufac'] = $this->cardata_model->get_car_manufacturer();
            
        for($i=0; $i<count($data['car_manufac']); $i++){
                
            $fin_data[] = array(
                            'value'=>$data['car_manufac'][$i]['manufacturer'],
                            'label'=>$data['car_manufac'][$i]['manufacturer']
            );
                
        }
            
            echo json_encode($fin_data);
    }
    
    function get_model()
    {
        $data['car_model'] = $this->cardata_model->get_car_model($_POST['manu']);
        
        for($i=0; $i<count($data['car_model']); $i++){
            
                $fin_data[] = array(
                        'value'=>$data['car_model'][$i]['model'],
                        'label'=>$data['car_model'][$i]['model']
                );
            
        }
        
        $_SESSION['car_models'] = json_encode($fin_data);
        
        echo json_encode($fin_data);
    }
    
    public function get_variant()
    {
        $data['car_variant'] = $this->cardata_model->get_car_variant($_POST['model']);
        
        for($i=0; $i<count($data['car_variant']); $i++){
            
                $fin_data[] = array(
                        'value'=>$data['car_variant'][$i]['model_type'].'@@'.$data['car_variant'][$i]['fuel_type'],
                        'label'=>$data['car_variant'][$i]['model_type'].' '.$data['car_variant'][$i]['fuel_type']
                );
            
        }
        
        $_SESSION['car_variant'] = json_encode($fin_data);
        
        echo json_encode($fin_data);
    }
------------------this is apex class---
global with sharing class ExchangeRemoter{
    
    
    public static list<jud_old_cars__c> oldCars{get; set;}
    
    public ExchangeRemoter(){ 
    
    }
    
    @RemoteAction
    global static Map<String, String> get_car_manufacturer(){
        
        //Set<Id> makersId = new Set<Id>();
        //Set<jud_old_cars__c> retCars = new list<jud_old_cars__c>();
        List<Map<String,String>> oldCarList = new  List<Map<String,String>>();
        
        
            list<jud_old_cars__c> oldCars = [Select manufacturer__c from jud_old_cars__c group by manufacturer__c];
        
                                      
        for(jud_old_cars__c manu : oldCars){
           
          //AggregateResult manus = [select manufacturer__c FROM jud_old_cars__c GROUP BY manufacturer__c];
          
            oldCarList.add(new Map<String, String> { 
                                         'value'=>manu.manufacturer__c,
                                         'label'=>manu.manufacturer__c
                                         });
          
            
            

        }
        return oldCarList;
    }
}



i'm getting error this . i have create object and field ..i want to create a class and give remote .please help me out friends 
Illegal assignment from List<AggregateResult> to List<jud_old_cars__c>
Illegal conversion from List<Map<String,String>> to Map<String,String>
Hi, 

I want integrate salesforce with externl website using REST. 

I am able to hit the External system URL. I was Struct here...!  and how we can get data from external website & how to code for that...?
Like whenever a user enter their account details in external website, those data should also get into salesforce accounts.
 
Hi folks,

can any one help me out asap

Using REST api in salesforce pull/Get data from External website to salesforce

thanks 
vishal
I want to integrate Salesforce with some website from which I want to get some data. According to that website API, we have to create Sessions and then other working.
I have searched for sessions in salesforce but have not found any related information that makes me clear about it. 
So please give me some right direction to get my answer. 
Thanks 
vishal
Hi ,

1--How to create a session and cookie in salesforce ?
I want to integrate Salesforce with some website from which I want to get some data. According to that website API, we have to create Sessions and then other working. I have searched for sessions in salesforce but have not found any related information that makes me clear about it. So please give me some right direction to get my answer.

Thanks
Hi ,
i'm trying to write a query php to apex classess , but i'm getting error can any one help me out..asap.
my query is like this type in php --i want to this query in apex class.

SELECT `l`.`city`, `l`.`pref_dlr1`, `l`.`pref_dlr2`, `l`.`pref_dlr3`, `d`.`name`, `d`.`dlrid`, 
`d`.`state` AS `dlr_states`, `d`.`city` AS `dlr_city`, `d`.
`ud_dlrid`FROM `jud_city_list` `l`JOIN `jud_dlr_list` `d` ON `d`.
`dlrid` IN (l.pref_dlr1,l.pref_dlr2,l.pref_dlr3)WHERE `l`.`city` LIKE 'm%' ESCAPE '!'ORDER BY `l`.
`city` ASC


l-city list
d- dlr locator
how to eliminate the login credentials for a third party application connected in salesforce
Displaying data from third party application on visualforce page or our org..
Hi,
this is code in php 

function get_car_manufacturer()
    {
        $data['car_manufac'] = $this->cardata_model->get_car_manufacturer();
            
        for($i=0; $i<count($data['car_manufac']); $i++){
                
            $fin_data[] = array(
                            'value'=>$data['car_manufac'][$i]['manufacturer'],
                            'label'=>$data['car_manufac'][$i]['manufacturer']
            );
                
        }
            
            echo json_encode($fin_data);
    }
    
    function get_model()
    {
        $data['car_model'] = $this->cardata_model->get_car_model($_POST['manu']);
        
        for($i=0; $i<count($data['car_model']); $i++){
            
                $fin_data[] = array(
                        'value'=>$data['car_model'][$i]['model'],
                        'label'=>$data['car_model'][$i]['model']
                );
            
        }
        
        $_SESSION['car_models'] = json_encode($fin_data);
        
        echo json_encode($fin_data);
    }
    
    public function get_variant()
    {
        $data['car_variant'] = $this->cardata_model->get_car_variant($_POST['model']);
        
        for($i=0; $i<count($data['car_variant']); $i++){
            
                $fin_data[] = array(
                        'value'=>$data['car_variant'][$i]['model_type'].'@@'.$data['car_variant'][$i]['fuel_type'],
                        'label'=>$data['car_variant'][$i]['model_type'].' '.$data['car_variant'][$i]['fuel_type']
                );
            
        }
        
        $_SESSION['car_variant'] = json_encode($fin_data);
        
        echo json_encode($fin_data);
    }
------------------this is apex class---
global with sharing class ExchangeRemoter{
    
    
    public static list<jud_old_cars__c> oldCars{get; set;}
    
    public ExchangeRemoter(){ 
    
    }
    
    @RemoteAction
    global static Map<String, String> get_car_manufacturer(){
        
        //Set<Id> makersId = new Set<Id>();
        //Set<jud_old_cars__c> retCars = new list<jud_old_cars__c>();
        List<Map<String,String>> oldCarList = new  List<Map<String,String>>();
        
        
            list<jud_old_cars__c> oldCars = [Select manufacturer__c from jud_old_cars__c group by manufacturer__c];
        
                                      
        for(jud_old_cars__c manu : oldCars){
           
          //AggregateResult manus = [select manufacturer__c FROM jud_old_cars__c GROUP BY manufacturer__c];
          
            oldCarList.add(new Map<String, String> { 
                                         'value'=>manu.manufacturer__c,
                                         'label'=>manu.manufacturer__c
                                         });
          
            
            

        }
        return oldCarList;
    }
}



i'm getting error this . i have create object and field ..i want to create a class and give remote .please help me out friends 
Illegal assignment from List<AggregateResult> to List<jud_old_cars__c>
Illegal conversion from List<Map<String,String>> to Map<String,String>
Hi folks,

can any one help me out asap

Using REST api in salesforce pull/Get data from External website to salesforce

thanks 
vishal
I want to integrate Salesforce with some website from which I want to get some data. According to that website API, we have to create Sessions and then other working.
I have searched for sessions in salesforce but have not found any related information that makes me clear about it. 
So please give me some right direction to get my answer. 
Thanks 
vishal
Hi ,

1--How to create a session and cookie in salesforce ?
I want to integrate Salesforce with some website from which I want to get some data. According to that website API, we have to create Sessions and then other working. I have searched for sessions in salesforce but have not found any related information that makes me clear about it. So please give me some right direction to get my answer.

Thanks
Displaying data from third party application on visualforce page or our org..