Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

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

(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,959 Super User 2024 Season 1 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,959 Super User 2024 Season 1 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,469 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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans