• deep123456789
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

Can any one tell me how can i implement a spell check functionality in salesforce.

I tried many things but nothing seems to be working inside salesforce..plz help...

To create test data i need to insert some value in ProcessInstanceWorkitem .But it is not allowed.I am using ProcessInstanceWorkitem  to identify all the approvals that are pending for approval.

Can any one help to write a test method for this method given below.I need this urgently.



public static void notifyDelegatedApprover(){
   
    
     List <ProcessInstanceWorkitem> pendingApprovalList=null;
     pendingApprovalList=[Select p.SystemModstamp, p.ProcessInstance.TargetObjectId,
     p.ProcessInstance.TargetObject.name,p.OriginalActorId, p.IsDeleted, p.Id,
     p.CreatedDate, p.CreatedById,p.ActorId,p.Actor.name,p.Actor.Email
     From ProcessInstanceWorkitem p];
    
       
     for(ProcessInstanceWorkitem pendingObj:pendingApprovalList){
       System.debug('Pending Approval --actual approvers id ------'+pendingObj.ActorId); 
       System.Debug('Target Object Id------------'+pendingObj.ProcessInstance.TargetObject.name);
       approverUserIdSet.add(pendingObj.ActorId);
     }
     System.Debug('----pendingApprovalList  Size-----------'+pendingApprovalList.size());
    
     for(User approvers:[select Id,DelegatedApproverId,Vacation_Start_Date__c,Vacation_End_Date__c
                                    from User
                                    where id in:approverUserIdSet
                                    and Vacation_Start_Date__c <> null
                                    and Vacation_End_Date__c <> null
                                    and DelegatedApproverId <> null]) {
            if (approvers.Vacation_Start_date__c < System.today() && approvers.Vacation_End_date__C > System.today()) {
                System.debug('Delegated Approver Id------'+approvers.DelegatedApproverId);
                delegatedApproverUserIdSet.add(approvers.DelegatedApproverId);
                approversOnVacation.add(approvers.Id);
                if(delegatedApproversMap.get(approvers.Id) == null) delegatedApproversMap.put(approvers.Id, approvers.DelegatedApproverId);
            }
        }
       
        //send email notification
        sendMail(getDelegatedApproverEmail(delegatedApproverUserIdSet),getMessage());
   
    }

Can any one tell me how can i implement a spell check functionality in salesforce.

I tried many things but nothing seems to be working inside salesforce..plz help...