4 Replies Latest reply on Oct 7, 2016 2:35 AM by florian1

    Profile Link Validation

    Apprentice

      Hi all,

      The Created By (profile link) found in service requests brings back terminated employees and I want to filter these out. I've asked HEAT support the same question but it's got us stumped.

      Thinking it was a simple picklist I was going to add a constraint but found it uses a link field instead which connects to frs_compositeContract_Contact and this does not contain a status field like the employee object.

       

      I found a Condition link in the profilelink relationship (ServiceReqAssociatedCustomer) and tried adding an arbitary condition just to see if it had the desired effct of restricting the results - It worked so I set about trying to pull through the status of the employee.

       

      I have tried setting up a new relationship between Employee and ServiceReq  joining them with the RecID and ProfileLink_RecID respectively. The idea being that once a relationship existed I could add a new condition to the existing relationship and then pull through the status. Unfortunately this didn't work, presumably because the new relationship is not created until a customer is added.

       

      I then thought I could (somehow) navigate through the relationships and I would eventually get to the Employee object where I would be able to build an expression. I got as far as this and it ended with no link to employee -

      ServiceReq

      Frs_CompositeContract_Contact

      Frs_CompositeContract_Entity

       

      Any help appreciated

       

      Chris

        • 1. Re: Profile Link Validation
          florian1 Expert

          Filtering out the Status is not an issue:

          1) Add the field "Status" to Frs_CompositeContract_Contact:

          This field will automatically pull the value from the Employee business object.

           

          2) Add a condition to your relationship,e.g IncidentAssociatedCustomer:

           

           

          The big disadvantage here: If a user gets disabled this field gets updated as well and forces you to choose a different Employee instead. (In HEAT7.x this didn't affect existing Incidents)

          -> You can set this field to read-only but I don't know if that's the coolest way..

          • 2. Re: Profile Link Validation
            Apprentice

            Hi,

            Sorry for the delay!

            I've added a status field to the Frs_CompositeContract_Contact business object and added a condition ($([OtherObject]Status == "Active")) to the ServiceReqAssociatedCustomer relationship.

            This removed all users from the profile link field so I removed the condition and they appeared again.

             

            I then added Status to the Frs_CompositeContract_Contact form to see if the status is pulling through from the employee. When I search for an employee that has two records (one terminated account and one active) in the Contact store the Status is blank for both. From what I gather it doesn't appear to be pulling them through automatically.

             

            Regarding your last comment - does this mean if a ticket is submitted and the customer is terminated before it's picked up that the new owner would then have to choose a new customer?

             

            Thanks

            • 3. Re: Profile Link Validation
              florian1 Expert

              Hi,

               

              regarding my comment: Yes, that's exactly my issue...

               

              this filtered relationship doesn't seem to work anymore with 2015.2.1.1. Which version is HEAT Cloud on?

              (But at least the status is shown correctly:)

               

              It is working fine in 2015.2.1 though.

              I've just opened up a bug..

               

               

              Cheers,

              Florian

              • 4. Re: Profile Link Validation
                florian1 Expert

                Even though this is a bit older, I have a working solution for 2015.2.2:

                 

                Create a field in frs_compositecontract_contact:

                XTN_EmployeeStatus (Unicode Text 40, validated: ProfileStatus of ProfileEmployeeStatus)

                 

                In the Employee# object, add a before save rule:

                XTN_EmployeeStatus = $(Status)
                
                

                 

                You are now able to filter out inactive Employees as a relationship condition.

                I have added the Status as a condition because otherwise the customer name won't show up anymore in closed/resolved Incidents:

                 

                $(if Status == "Closed" || Status == "Resolved"
                  then [OtherObject]XTN_EmployeeStatus == "Active" ||
                      [OtherObject]XTN_EmployeeStatus == "Terminated"
                  else [OtherObject]XTN_EmployeeStatus == "Active")
                
                

                 

                Do not try to use

                Status in ("Resolved","Closed")
                
                

                as this will result in an error message when you try to modify anything in the Incident object.

                 

                 

                In HEAT 2016.x can use a filtered link field.