Workflow Saved object properties - Direct Reports

Hi Team. 

I have a workflow and i am using a Saved Object Properties activity to save some extra attribute values which i am then using in a Notification activity. This is using the Workflow target. 

What i need to do is save the object properties of any Direct Reports workflow target has on the the account has such as SamAccountName , DisplayName and use these values in the notification email. 

The bit i am stuck on is getting the Directo Reports details. 

Thanks in advance  

Parents
  • You can get the list of the direct reports for the in-process object using a script Activity and then feed them to some VAs on your workflow target

    Here's some pseudo code:

    $DirectReportsList = $DirObj.GetEx("DirectReports")  # $DirObj is the current in process object (i.e. your workflow target)

    Foreach ($DirectReportsListItem in $DirectReportsList)
    {

    # Get the samaccountname(s) and append it(them) to a multi-value VA on the workflow target ($Request.DN) holding direct report samaccountnames

    # Get the displayname(s) and append it(them) to a multi-value VA on the workflow target ($Request.DN) holding direct report displaynames

    }

    Reference your VAs in your notification email.

  • Thanks Johnny. I am trying to follow along with this. 

    So i have created added the script but not done anything yet with the get SamAccount part yet. 

    function DirectReport($Request) { 
    $DirectReportsList = $DirObj.GetEx("DirectReports") 
    
    foreach ($DirectReportsListItem in $DirectReportsList)
    {
    
    # Get the samaccountname(s) and append it(them) to a multi-value VA on the workflow target ($Request.DN) holding direct report samaccountnames
    
    # Get the displayname(s) and append it(them) to a multi-value VA on the workflow target ($Request.DN) holding direct report displaynames
    
    }
    }

    Just for now i have added a Parameter to the workflow called DRSamAccountName

    I have added the script to the workflow. 

    Is that correct so far? 

Reply
  • Thanks Johnny. I am trying to follow along with this. 

    So i have created added the script but not done anything yet with the get SamAccount part yet. 

    function DirectReport($Request) { 
    $DirectReportsList = $DirObj.GetEx("DirectReports") 
    
    foreach ($DirectReportsListItem in $DirectReportsList)
    {
    
    # Get the samaccountname(s) and append it(them) to a multi-value VA on the workflow target ($Request.DN) holding direct report samaccountnames
    
    # Get the displayname(s) and append it(them) to a multi-value VA on the workflow target ($Request.DN) holding direct report displaynames
    
    }
    }

    Just for now i have added a Parameter to the workflow called DRSamAccountName

    I have added the script to the workflow. 

    Is that correct so far? 

Children
No Data