You need to sign in to do that
Don't have an account?
Akshay Mhetre
Test class......not getting coverd ..give me solution..help please
@AuraEnabled
public static string getProfileCached(Id RecordId){
Id profileId = UserInfo.getProfileId();
String profileName =[Select Id, Name from Profile where Id=:profileId].Name;
system.debug('Profile Name'+profileName);
if('RCU Agent Community' == profileName){
List<Case> caselist= [Select Id, RecordTypeId, OwnerId, Agent_Decision__c, Allocated_By__C, RCU_Sampling_Status__c
From Case Where ParentId=:RecordId and RCU_Agency_Action__c <>'Accepted'];
if(caseList != null && caseList.size()>0){
return 'show';
}else{
return 'hide';
}
}
return 'hide';
}
public static string getProfileCached(Id RecordId){
Id profileId = UserInfo.getProfileId();
String profileName =[Select Id, Name from Profile where Id=:profileId].Name;
system.debug('Profile Name'+profileName);
if('RCU Agent Community' == profileName){
List<Case> caselist= [Select Id, RecordTypeId, OwnerId, Agent_Decision__c, Allocated_By__C, RCU_Sampling_Status__c
From Case Where ParentId=:RecordId and RCU_Agency_Action__c <>'Accepted'];
if(caseList != null && caseList.size()>0){
return 'show';
}else{
return 'hide';
}
}
return 'hide';
}
Try Below Test Class Please Mark It As Best Answer If It Helps
Thank You!