Workflow to invoke a dialog RRS feed

  • Question

  • Hi there,

    New to Dynamics and CRM Development. Just wondering if it's possible to invoke a dialog through running an on-demand workflow or am I wasting my time! 

    I can see that it's not possible within the CRM but am currently investigating if it's possible through creating a Custom Workflow Activity in Visual Studio. 

    Thanks in advance.

    Edit: maybe I should give the problem some context! I have created a workflow and a dialog which work very similar - with the only difference being that the dialog allows the user to make a choice whereas the workflow has a default option set up.

    The only problem is that I want to select multiple records for the dialog in order to make a decision with these records but I can't start a dialog on more than one record!

    Friday, June 3, 2016 11:40 AM

All replies

  • A workflow is a background process. No UI element can be involved.

    A dialog involves the user interacting with the process and therefore can involve the UI.

    You can launch a workflow from a Dialog (and have the Dialog feed it its parameter) if you want to reuse the same logic between the two. 

    It's a design issue that is not so much tied to CRM but to the context of what you are trying to accomplish.

    The scenario where you have a dialog that fires multiple time by checking items in the grid is rarely usefull as each Dialog window must operate in the context of one record so you would get a stack of Dialog windows.

    I can suggest 2 workaround strategies for doing what you want.

    1) If the information gathered in the dialog would be the same for all selected records then I suggest you

    a. do a batch edit and have the workflow be fired when this particular field is changed. Not as clean as a dialog I know.


    b. Have some javascript code that asks the question and then fire your workflow for each record.

    2) If the information would be different for each selected record then I do not see any other option then launch the dialog in sequence or do it from the record's form.

    Sylvain Hamel

    Friday, June 3, 2016 12:34 PM
  • I'll give those options a go and let you know how it goes. Thanks very much. 
    Friday, June 3, 2016 1:01 PM
  • Hi, 

    you cant execute a dialogue from workflow. 

    instead we have option to add custom button in crm and from the custom buttons we can call required Javascripts  passing the selected record set. so what ever you are doing through the workflow you can do it from the from script or else u can set some values in the form and make the workflow to trigger so that it will work based on the user input also.

    You can use ribbon workbench to customize the ribbon in CRM to add buttons. 

    With Regards Athul MT http://www.athulmt.blogspot.in/

    Sunday, June 5, 2016 7:59 AM