Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Open workflows and word templates on click of buttons, the buttons are located at HTML web resource

(0) ShareShare
ReportReport
Posted on by 70
I would like to set up the workflows and word templates buttons (highlighted in the attached screen print) on the HTML web resource and on click of these buttons would like to execute them for one or more selected records.
I know that CRM uses following URL to open that window.
For workflow - "+ Organization URL +"/_controls/lookup/lookupinfo.aspx?AllowFilterOff=0&DefaultViewId=45102185-B1B4-422B-A3BF-F1BA9C6E130A&IsTypeUnresolved=&LookupStyle=single&ShowNewButton=0&ShowPropButton=1&browse=0&dType=1&isRegardingFieldPopulated=false&membertypecode=" +entityCode + "&mrsh=false&objecttypes=4703"
And the below URL to execute the selected workflow for the selected record(s) one by one.
"+ Organization URL +"/_grid/cmds/dlg_runworkflow.aspx?iId=" + Record ID+ " &iIndex="+ Execution Order +"&iObjType=" + Entity object code + "&iTotal=" + No. of Selected Records + "&sIds=&wfId="+ Selected Workflow ID
However, when I open the popup window using the very first URL above, it doesn't do anything on click of the Add button, PFA the screen print for the same.
Can anyone advise how can I make it functional same as Advanced Find? I know this is an unsupported way but would like to do it for one of my customers.
Attachments area
2018.AdvancedFind.pngWorkflowList.png

*This post is locked for comments

  • Suggested answer
    Seren S Profile Picture
    400 on at
    RE: Open workflows and word templates on click of buttons, the buttons are located at HTML web resource

    Hi Bhavika,

    You can't merge URL with parameters then call with window.open() function because the controller requires some commands which have to run in the back.

    You can find the command collection in the button's elements like account|NoRelationship|Form|Mscrm.RunWorkflowPrimary but also dealing with these Xrm.Core libraries are not supported.

    You can use  Xrm.Utility.lookupObjects to open lookup views from your web resource.

    Here is a similar example with yours.

    https://www.inogic.com/blog/2018/06/show-lookup-dialog-in-dynamics-365-v9-0/

    Hope it can give you a clue.

    Cheers, Seren.

  • Bhavika A. Vala Profile Picture
    70 on at
    RE: Open workflows and word templates on click of buttons, the buttons are located at HTML web resource


    Thank you for the response. I want to add button on HTML Page and show the list of On Demand workflows for the related entity. On click of selected workflow from the list, want to run that workflow for all selected records. Please advise me on it.

  • Suggested answer
    StefanS365 Profile Picture
    3,573 Most Valuable Professional on at
    RE: Open workflows and word templates on click of buttons, the buttons are located at HTML web resource

    Hi Bhavika,

    There's a supported way by using the Ribbon Work Bench to add a button that can start a workflow:

    ribbonworkbench.uservoice.com/.../132235-create-a-workflow-short-cut-ribbon-button-no-code

    www.cloudfronts.com/call-workflow-directly-from-a-button-using-ribbon-workbench

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,863 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans