This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to include search object in an email?

 Hi guys,

I'm attempting to build a workflow that will look for a virtual attribute set to a date/time. The workflow will compare the time to the current time, and send an email once the time is older than current time.

My issue is that I can't seem to get the email to include the name of the object found by the search. How can I go about doing this? Basically it's to send out a notification for a user departure. Typically I'd use this:

<% =Operation.TargetObjectDisplayName %>

But that does not seem to work, as it isn't technically the target. Is what I'm trying to do possible? There are a few different variables I'm trying to pull from the AD object, but Display Name would be a good start

Parents
  • Thanks for sharing this.

    Can I suggest the following to cut down on the number of Get-QADUser calls...

    $UserDetails = Get-QADUSer -identity $dn -proxy -IncludedProperties edsva-LastDateinOffice,edsva-BuildingAccessTerminationTime,edsva-DepartureDateTime

    # Name and cn are the same thing
    $displayname = $UserDetails.name
    $departureTime = $UserDetails.'edsva-LastDateinOffice'
    $buildingcutoff = $UserDetails.'edsva-BuildingAccessTerminationTime'
    $departdatetime = $UserDetails.'edsva-DepartureDateTime'
Reply
  • Thanks for sharing this.

    Can I suggest the following to cut down on the number of Get-QADUser calls...

    $UserDetails = Get-QADUSer -identity $dn -proxy -IncludedProperties edsva-LastDateinOffice,edsva-BuildingAccessTerminationTime,edsva-DepartureDateTime

    # Name and cn are the same thing
    $displayname = $UserDetails.name
    $departureTime = $UserDetails.'edsva-LastDateinOffice'
    $buildingcutoff = $UserDetails.'edsva-BuildingAccessTerminationTime'
    $departdatetime = $UserDetails.'edsva-DepartureDateTime'
Children
No Data