1 Reply Latest reply on Nov 17, 2017 5:17 AM by AlasdairRobertson

    Searching for outstanding SRs for a Terminated Employee

    sgillard Apprentice

      Is there an easy way to build a saved search for all Service Requests that are not closed, completed, cancelled but the employee is terminated?  I'm not having any luck.

        • 1. Re: Searching for outstanding SRs for a Terminated Employee
          AlasdairRobertson ITSMMVPGroup

          I cannot do this for historical records without a sql script off the top of my head.  For future you need to add a relationship to the Employee Object.  Then you can call any fields from the Employee object, this is due ot the way the frs_compositecontract object work.


          1. Add a new link field to ServiceReq - CustomerEmployeeLink (Link)
          2. Add a  new relationship to the Employee object using your new field in a 0..N:0..1 (Zero or many to zero or one) cardinality
          3. Update the existing profile link relationship ServiceReqAssociatedCustomer so the ProfileLink_RecId is copied to your new field CustomerEmployeeLink


          When a customer is linked it will also create a new link relationship to the employee object, now you can use this in a saved search.



          For existing records you could run an SQL script to copy the ProfileLink_RecId to the CustomerEmployeeLink_RecId field. (backup database first)


          Something like:

          Update ServiceReq

          Set CustomerEmployeeLink_RecId =  ProfileLink_RecId


          Obviously check field names etc in the first instance.