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 365 | Integration, Dataverse...
Suggested Answer

Calling a Workflow from JavaScript with no Parameters

(0) ShareShare
ReportReport
Posted on by 4

Hi,

I have a workflow that takes no parameters that is triggered from the a main entity (let's call it "entityfoo").

When you got to the main page for "entityfoo" - I have a button that I want people to be able to click that calls an async workflow that goes off and populates records into "entityfoo".

This workflow is not tied to a specific entity record, it simply populates the list.

How can I call this workflow in D365?  I vaguely remember doing this before using the "Run Workflow" command in the non-unified interface but this doesn't seem possible now.

Is this possible and if not how do I trigger a workflow in this manner?

(It doesn't have to be a button or javascript, happy with whatever can work).

Thank you - Greg.

I have the same question (0)
  • Suggested answer
    Charan Raju C R Profile Picture
    7 Moderator on at

    Hi Greg,

    Check below link to trigger workflow from javascript. When the button is clicked, you should be able to get all the selected record IDs and loop through each IDs to trigger workflow.

    www.inogic.com/.../

  • IAmGreg Profile Picture
    4 on at

    But this requires an entity id to be present.

    In my case, there are no entity records populate, my workflow populates the records.  

    I've tried modifying these code snippets without entity id and they all generate errors.

    My workflow does not require any input parameters.

  • Suggested answer
    Charan Raju C R Profile Picture
    7 Moderator on at

    It is mandatory to pass record id to trigger workflow. This id must be a GUID of an entity record you had selected while creating your workflow.

    Since the functionality of this workflow is to create records, you can convert the records creation logic from workflow to javascript so that, upon button click, javascript will directly create the records without triggering workflow.

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    If you are looking for "Run Workflow", it has been moved under the Flows which appears when you select an existing record. Refer below screenshot-

    pastedimage1624234993422v1.png

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 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 80

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans