You need to sign in to do that
Don't have an account?
Hardik B
Comparison arguments must be compatible types: Map<String,String>, String: Line 18
Hello All,
I'm trying to wrtie this @RemoteAction code but due to certain errors and problems, I'm not able to complete the code.
Error 1: Comparison arguments must be compatible types: Map<String,String>, String: Line 18
Error 2: Illegal conversion from List<Map<String,String>> to String: Line 39
Here's the preview of my code:
// Get the Finance Calculation for the page
global with sharing class FinanceRemoter {
public Map<String, String> emiCal {get; set;}
public static list<jud_new_cars_list__c> ncl {get; set;}
public static list<jud_new_cars_pricing__c> ncp {get; set;}
public static list<jud_model_colour__c> mc {get; set;}
public FinanceRemoter(){ }
@RemoteAction
global static String financeSearch(Map<String, String> emiCal){
Set<ID> nclList = new Set<ID>();
list<jud_new_cars_list__c> retCarList = new list<jud_new_cars_list__c>();
List<Map<String, String>> carList = new List<Map<String, String>>();
if (emiCal != ''){
List<jud_new_cars_pricing__c> jncp = [SELECT Id, Name, downpayment__c, emi1__c, emi2__c, product_id__c, product_id__r.Id
FROM jud_new_cars_pricing__c
WHERE product_id__r.Name
LIKE: (emiCal+'%')];
for(jud_new_cars_pricing__c jncpList : jncp){
if(jncpList.product_id__c != null) {
nclList.add((Id)jncpList.product_id__c);
System.debug('Matching Product Id ===>' +nclList);
List<jud_new_cars_list__c> newcarList = [SELECT Id, Name, model__c, submodel__c, engine__c, variant__c, fuel_type__c, seat__c
FROM jud_new_cars_list__c
WHERE id IN: nclList];
}
nclList.clear();
}
}
return carList;
}
}
Can anyone please help me out where I'm going wrong. Please It will be really very helpful.
Regards,
HB.
I'm trying to wrtie this @RemoteAction code but due to certain errors and problems, I'm not able to complete the code.
Error 1: Comparison arguments must be compatible types: Map<String,String>, String: Line 18
Error 2: Illegal conversion from List<Map<String,String>> to String: Line 39
Here's the preview of my code:
// Get the Finance Calculation for the page
global with sharing class FinanceRemoter {
public Map<String, String> emiCal {get; set;}
public static list<jud_new_cars_list__c> ncl {get; set;}
public static list<jud_new_cars_pricing__c> ncp {get; set;}
public static list<jud_model_colour__c> mc {get; set;}
public FinanceRemoter(){ }
@RemoteAction
global static String financeSearch(Map<String, String> emiCal){
Set<ID> nclList = new Set<ID>();
list<jud_new_cars_list__c> retCarList = new list<jud_new_cars_list__c>();
List<Map<String, String>> carList = new List<Map<String, String>>();
if (emiCal != ''){
List<jud_new_cars_pricing__c> jncp = [SELECT Id, Name, downpayment__c, emi1__c, emi2__c, product_id__c, product_id__r.Id
FROM jud_new_cars_pricing__c
WHERE product_id__r.Name
LIKE: (emiCal+'%')];
for(jud_new_cars_pricing__c jncpList : jncp){
if(jncpList.product_id__c != null) {
nclList.add((Id)jncpList.product_id__c);
System.debug('Matching Product Id ===>' +nclList);
List<jud_new_cars_list__c> newcarList = [SELECT Id, Name, model__c, submodel__c, engine__c, variant__c, fuel_type__c, seat__c
FROM jud_new_cars_list__c
WHERE id IN: nclList];
}
nclList.clear();
}
}
return carList;
}
}
Can anyone please help me out where I'm going wrong. Please It will be really very helpful.
Regards,
HB.
This code I'm writing to get the Prodcut Id (API: Name) of jud_new_cars_list__c and product_id__c of jud_new_cars_pricing__c as both of the fields have the same value and product_id__c is lookup with jud_new_cars_list__c.
What I'm trying to achieve here is jud_new_cars_list__c.Name (Product Id) = jud_new_cars_pricing__c.product_id__c.
How can I achieve that ? Is my code going in a right way or do i need to make changes to achieve the desired output. I'm new to apex so dont know much about it.
Many many thanks in advance.
Zapraszamy na największą polską konferencję poświęconą technologiom Microsoft, czyli EXPERT SUMMIT 2017 - All about Microsoft technologies, która odbędzie się 9 listopada 2017 roku w Lubelskim Parku Naukowo-Technologicznym w Lublinie.
Zarejestruj się na: www.expertsummit.pl
Bezpłatny wstęp!
Ponad 1000 uczestników!
Najlepsze firmy z branży IT i nowych technologii!
Giełda pracy IT oraz Giełda B2B!
Unikalne prezentacje prowadzone przez najwybitniejszych prelegentów w technologiach Microsoft.
Ścieżki: dev, IT Pro, data platform, innovation!
[img]https://scontent.fwaw3-1.fna.fbcdn.net/v/t31.0-8/18491483_1386620371391318_2432480551253933648_o.png?oh=9d04c58be1000bc8465388340ab89fb7&oe=5A63D228[/img]
🏁 Zapraszamy na największą polską konferencję poświęconą technologiom Microsoft, czyli EXPERT SUMMIT 2017 - All about Microsoft technologies, która odbędzie się 9 listopada 2017 roku w Lubelskim Parku Naukowo-Technologicznym w Lublinie.🏁
💾 Zarejestruj się na: www.expertsummit.pl 💾
⚡⚡ Bezpłatny wstęp! ⚡⚡
⚡⚡ Ponad 1000 uczestników! ⚡⚡
⚡⚡ Najlepsze firmy z branży IT i nowych technologii! ⚡⚡
⚡⚡ Giełda pracy IT oraz Giełda B2B! ⚡⚡
⚡⚡ Unikalne prezentacje prowadzone przez najwybitniejszych prelegentów w technologiach Microsoft. ⚡⚡
⚡⚡ Ścieżki: dev, IT Pro, data platform, innovation!. ⚡⚡