web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Get Custom Workflow output from JavaScript

(0) ShareShare
ReportReport
Posted on by 680

Hi Experts,

We have a requirement where we need to create a copy of a record. What I did is I created a ribbon JavaScript that calls a Workflow. This Workflow has a Custom Workflow that creates the record and associated record to it.

Now, I want to open the newly created record on click of the button. How do I pass the ID from Custom Workflow back to JavaScript ?

Below is my JavaScript code to call the Workflow. I have a button in Main and in Form.

2018_2D00_09_2D00_19_5F00_12h04_5F00_45.png

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    You can't get value from workflow, but you can use action for this and you can reuse your workflow code, in action and action can return you guid of the record which you can open later on.

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Agree with Mahen. You need to create a workflow with output paramters and call your workflow within the custom action and set the output parameters. Something like this-

    6283.customactionactivty.png

  • Verified answer
    Preeti Sharma Profile Picture
    2,678 on at

    Hi,

    As suggested above custom action can do this for you. Call your custom activity as step in Custom Action and you can get output parameters.

    Thanks.

  • Verified answer
    Dynamics365 Rocker Profile Picture
    7,755 on at

    Workflow is asynchronous and it will not return output parameter in your script. If you make it synchronous then it might help you.

    Otherwise Create an action, Call your custom assembly in it and you will get output parameters in script response.

    If you want to know, How to call an action from script, Please refer below link:

    community.dynamics.com/.../230656

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans