• Hardik Baldania 4
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 8
    Replies
Hello All,

I've a situation in where I have to get the SOQL query output in all different rows. So how can we do it ? 

Can we use <br> tag in apex class? 

I'm use to apex and I dont know how to do that. Can anyone please explain with some examples and codes.

Regards,
Hardik B.
I'm trying to create a @RemoteAction with my javascript to work. But I'm getting this erorr all over again and again. I dont know where I'm going wrong in my codes. As this is my first time creating @RemoteAction class.

Here is my code which I created:

global with sharing class UdaanRemoter{

    public string cityname {get; set;}
    public list<Jaquar_Dealer_List__c> retdlr; 
    public Set<ID> dlrIdList;
    public UdaanRemoter()
    {
        dlrIdList = new Set<ID>();
    }
    @RemoteAction
    global static Jaquar_City_List__c getDealer(String cityname)
    {
         if(cityname != '')
        {
            Jaquar_City_List__c cityData= [SELECT Id, City__c, District__c, Pref_Dealer1__c, Pref_Dealer2_del__c,
                                                  Pref_Dealer3_del__c, State__c, Territory_Status__c 
                                                   FROM Jaquar_City_List__c WHERE City__c=: cityname];
            
            if(cityData.Pref_Dealer1__c != NULL)
            {
                dlrIdList.add((Id)cityData.Pref_Dealer1__c);
            }
            else if(cityData.Pref_Dealer2_del__c != NULL)
            {
                dlrIdList.add((Id)cityData.Pref_Dealer2_del__c);
            }
            else if(cityData.Pref_Dealer3_del__c != NULL)
            {
                dlrIdList.add((Id)cityData.Pref_Dealer3_del__c);
            }
            
            System.debug('Matching Dealer ID------------------------------->' + dlrIdList);   
            retdlr = [SELECT Id, Name, State__c, City__c, Dealer_Id__c, Email__c 
                                              FROM Jaquar_Dealer_List__c]; 
            dlrIdList.clear();
            System.debug('Matching Dealer Details------------------------------->' + retdlr);
        }
    
        } 
      
}

Can anyone help me on this. I would be really grateful. 

Thanks in Advance,
Hardik B.
Hello, 

I have a situation in which I have to run a single query from 2 differenct unrelated custom objects and I actually have no clue how to do that in SOQL, as SOQL doesn't have the JOIN functionality. 

I have 2 Custom Object named: 1. jud_city_list__c and 2. jud_dlr_list__c. 
This is the SQL query which I want to access through SOQL.

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

where l - jub_city_list__c object
          d - jub_dlr_list__c object. 

I don't know how to get this SQL query into SOQL query. Do I have to write a wrapper class for this ? Or Is there any other possible way available to get this query written into SOQL ?

Thanks you so much in advance, looking for some serious help.

Regards,
Hardik B.
Hello, 
I've a situaion in that I have to Create REST API with third party aps. So can anyone help me with the codes of creating a REST API and how can I fetch the data from the third party apps ?

Thank you for all your time and help. 

Regards,
Hardik B.
Hi there, 

I got following error on step 3.

A Volunteer Shift Worker record created for another user is not in their approval queue, or it does not have the correct status automatically assigned.

Anyone passed this step?

Thanks
LinThaw
Hello All,

I've a situation in where I have to get the SOQL query output in all different rows. So how can we do it ? 

Can we use <br> tag in apex class? 

I'm use to apex and I dont know how to do that. Can anyone please explain with some examples and codes.

Regards,
Hardik B.
I'm trying to create a @RemoteAction with my javascript to work. But I'm getting this erorr all over again and again. I dont know where I'm going wrong in my codes. As this is my first time creating @RemoteAction class.

Here is my code which I created:

global with sharing class UdaanRemoter{

    public string cityname {get; set;}
    public list<Jaquar_Dealer_List__c> retdlr; 
    public Set<ID> dlrIdList;
    public UdaanRemoter()
    {
        dlrIdList = new Set<ID>();
    }
    @RemoteAction
    global static Jaquar_City_List__c getDealer(String cityname)
    {
         if(cityname != '')
        {
            Jaquar_City_List__c cityData= [SELECT Id, City__c, District__c, Pref_Dealer1__c, Pref_Dealer2_del__c,
                                                  Pref_Dealer3_del__c, State__c, Territory_Status__c 
                                                   FROM Jaquar_City_List__c WHERE City__c=: cityname];
            
            if(cityData.Pref_Dealer1__c != NULL)
            {
                dlrIdList.add((Id)cityData.Pref_Dealer1__c);
            }
            else if(cityData.Pref_Dealer2_del__c != NULL)
            {
                dlrIdList.add((Id)cityData.Pref_Dealer2_del__c);
            }
            else if(cityData.Pref_Dealer3_del__c != NULL)
            {
                dlrIdList.add((Id)cityData.Pref_Dealer3_del__c);
            }
            
            System.debug('Matching Dealer ID------------------------------->' + dlrIdList);   
            retdlr = [SELECT Id, Name, State__c, City__c, Dealer_Id__c, Email__c 
                                              FROM Jaquar_Dealer_List__c]; 
            dlrIdList.clear();
            System.debug('Matching Dealer Details------------------------------->' + retdlr);
        }
    
        } 
      
}

Can anyone help me on this. I would be really grateful. 

Thanks in Advance,
Hardik B.
Hello, 

I have a situation in which I have to run a single query from 2 differenct unrelated custom objects and I actually have no clue how to do that in SOQL, as SOQL doesn't have the JOIN functionality. 

I have 2 Custom Object named: 1. jud_city_list__c and 2. jud_dlr_list__c. 
This is the SQL query which I want to access through SOQL.

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

where l - jub_city_list__c object
          d - jub_dlr_list__c object. 

I don't know how to get this SQL query into SOQL query. Do I have to write a wrapper class for this ? Or Is there any other possible way available to get this query written into SOQL ?

Thanks you so much in advance, looking for some serious help.

Regards,
Hardik B.