You need to sign in to do that
Don't have an account?
Abderrahmane TRIA
would it be possible to know if the comment of an approval process is empty or not?
would it be possible to know if the comment of an approval process is empty or not? I made this code but I get penultimate comment and no current.
ProcessInstance[] pi = [SELECT Id,TargetObjectid, Status, (SELECT id,actor.name FROM Workitems), (SELECT Id,StepStatus, Comments FROM Steps ORDER BY CreatedDate DESC) FROM ProcessInstance WHERE TargetObjectId =: agr.Id AND Status = 'Pending']; if (pi.size() > 0 ){ system.debug('Comments '+pi[0].Steps[0].Comments); }
ProcessInstance[] pi = [SELECT Id,TargetObjectid, Status, (SELECT id,actor.name FROM Workitems), (SELECT Id,StepStatus, Comments FROM Steps ORDER BY CreatedDate DESC) FROM ProcessInstance WHERE TargetObjectId =: agr.Id AND Status = 'Pending']; if (pi.size() > 0 ){ system.debug('Comments '+pi[0].Steps[0].Comments); }
thank you for your answer but with this solution there is always the same problem, my goal is to detect if the comment is empty or not at the time of approved or rejection.
Ctd
TRIA A