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

Workflow script - nullable object must have a value - ARS 7.2

I am trying to run a script (powershell) in a workflow prior to a group creation (preCreate). When the workflow executes, I receive the error "nullable object must have a value". I have tried with; "function functionname($request) {}" and "function functionname($workflow) {}". Basically am I unable to execute scripts in the precreate part of a workflow. Whenever I run a script after creation, (postCreate), everything works fine. What am I doing wrong?

  • It would be helpful to see the code.  It sounds like you may be trying to manipulate a value from the Active Roles $Request in a way that is not appropriate for its data type.  That is just a guess.  Please share your code with us.

  • Thanks for your reply. 

    It does not mather what I put inside. Same error every time. Even with the simplest code, I get the error. The function can also be blank, and I will receive the error. But when the  workflow uses the script after (group) creation, everything works fine. I am starting to lose all my hair....

    function functionname($request) {

    $samaccount = $request.get("samaccountname")

    $ldapserver = $workflow.parameter("ldapserver")

    }

    or

    function functionname($request) {

    }

  • The workflow that contains this - did you create it from scratch or is it a copy?

    If a copy, try and create a brand new workflow.

    Otherwise, I would suggest opening a Support SR and having them investigate.

  • Thanks. I don't remember so I just tried with one from scratch. Same error.