You need to sign in to do that
Don't have an account?
Jaanu
illegal conversion from List to String ?
public static String getId(String Id){
return [SELECT HCP_Affiliation__c.Id FROM HCP_Affiliation__c WHERE HCP_Affiliation__c.Patient__c =:Id LIMIT 1];
I am getting error msg with the above statement saying "illegal conversion from List to String " ... I am limiting to one record ..not sure what the issue is.
return [SELECT HCP_Affiliation__c.Id FROM HCP_Affiliation__c WHERE HCP_Affiliation__c.Patient__c =:Id LIMIT 1];
I am getting error msg with the above statement saying "illegal conversion from List to String " ... I am limiting to one record ..not sure what the issue is.
solution :
but what if there is no result ?
You should code a bit more securely.