Skip to main content

Notifications

Microsoft Dynamics CRM forum
Suggested answer

Workflow Activity (CodeActivity) plugin output parameter returning a null value

editSubscribe (0) ShareShare
ReportReport
Posted on by 12

Hi,

I am attempting to execute a Workflow Activity plugin using JS via a Process Action.

Here is the JS that calls the process Action:

pastedimage1660169907859v1.png

And this is the process Action.

pastedimage1660169997185v2.png

And this is the part where I set the input parameter to the Workflow activity plugin.

pastedimage1660170071058v3.png

So far so good.

My workflow activity plugin has one INPUT parameter and one OUTPUT parameter (as show in the image above).

Here is the workflow activity plugin.

pastedimage1660170206380v4.png

As you can see, I have 2 parameters. I am just getting the input parameter and setting the value of the output parameter. Simple!

So when I call the action via JS, I was expecting the response to return "EscSacSiResponse: EOF!!! but I get instead a NULL value.

pastedimage1660170533467v5.png

As you can see above, the output parameter is null.

I know the Workflow activity plugin was called based on its trace log.

pastedimage1660170694580v6.png

The plugin code clearly shows I am setting the value of the OUTPUT parameter but it is giving me a null value.

Is there an extra step that I need to do, like assigning the value of the output parameter outside the plugin code?

Do I need to do an extra step in the configuration of the Process Action in order to return the value of the output parameter?

Anyone?

a2z 

 

  • CU29041406-0 Profile Picture
    CU29041406-0 3 on at
    Workflow Activity (CodeActivity) plugin output parameter returning a null value
    I faced the same issue and this screenshot that assign the output variable helped all my lost time debugging with trace. Thank you for that @cheezecake!
  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,937 Super User on at
    RE: Workflow Activity (CodeActivity) plugin output parameter returning a null value

    Please mark this thread completed by click on Yes under Did this answer your question.

  • cheezecake Profile Picture
    cheezecake 12 on at
    RE: Workflow Activity (CodeActivity) plugin output parameter returning a null value

    Yes, I did figure it out and got the result back. Just wish MS documented this more clearly and gave examples. Their documentation are all over the place and atrocious. 

    pastedimage1661896806278v1.png

    Thx

    a2z

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,937 Super User on at
    RE: Workflow Activity (CodeActivity) plugin output parameter returning a null value

    Hi,

    Yes, you need add another step Set variable to set the Action output variable with Workflow code activity output variable to see the result from js call.

  • Ray Profile Picture
    Ray 1,370 on at
    RE: Workflow Activity (CodeActivity) plugin output parameter returning a null value

    Hi,

    I think you need add a step in your action, set the output from workflow activity to your action output variable.

Helpful resources

Quick Links

Take the Community feedback survey!

Answer this brief 15-question survey about your Community experience…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,361 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,155 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans