Hello, Im hoping someone can give me a hand.
Im trying to update the users Deprovision Report record in a script after I have performed a function.. the script is being called by a workflow.
This is an example what I tried..
Function Oninit($Request)
{
$action = $Request.AddDeprovisioningReportRecord()
$action.Name = "Deprovisioning Function"
$action.AddListItem ("The Function has been performed")
$action.IsSuccess = $true
}
I would get an error saying that the "You cannot call a method on a null-valued expression"
Then I tried
Function Oninit($Request)
{
$action = $workflow.FoundObject("Search for Disabled Accounts").AddDeprovisioningReportRecord()
$action.Name = "Deprovisioning Function"
$action.AddListItem ("The Function has been performed")
$action.IsSuccess = $true
}
This one completed successfully. but nothing was added to the deprovisioning report.
any thoughts?