You need to sign in to do that
Don't have an account?
Hema Yejju
I have the below code for Sales Object..there is a field called 'Dis type' on sales object and api name is 'Dis_Type__c'
in the Sales record page if user selects Dis type as ' CallBck' the status of the record should be in working and in the same record
owner id should be assigned to Queue...Where owner id is Lookup(user,Group);
if(cs.Dis_Type__c == 'Callbck' ){
system.debug('cs.Disposition ' +cs.Disposition_Type__c);
List<Group> abcQueue = [select Id,Name from Group where Type = 'Queue'];
for(Group que : abcQueue){
if(que.Name == 'Sales Queue'){
cs.OwnerId = que.Id;
}
}
}
Can any one help me to write test method for this ?
Unable to write test method for assigning Queue to the OwnerId field
I have the below code for Sales Object..there is a field called 'Dis type' on sales object and api name is 'Dis_Type__c'
in the Sales record page if user selects Dis type as ' CallBck' the status of the record should be in working and in the same record
owner id should be assigned to Queue...Where owner id is Lookup(user,Group);
if(cs.Dis_Type__c == 'Callbck' ){
system.debug('cs.Disposition ' +cs.Disposition_Type__c);
List<Group> abcQueue = [select Id,Name from Group where Type = 'Queue'];
for(Group que : abcQueue){
if(que.Name == 'Sales Queue'){
cs.OwnerId = que.Id;
}
}
}
Can any one help me to write test method for this ?
Please follow below code:-
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh