Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Run a process(dialog) through c# code

(0) ShareShare
ReportReport
Posted on by

Hi,

Is there a way of "running" a dialog through C# code?
My use case is that i want a plugin to be triggered when a user creates a record and then start a dialog from that plugin when it is exiting so that the dialog is shown on the UI to confirm something from the user.

I found this link from the documentation https://msdn.microsoft.com/en-us/library/gg334435.aspx , but it just does a CRUD operation on dialogs. I want to "show" the dialog on the UI also.

P.S. I don't want/can't use Xrm library dialogs because of some limitations.

Thanks!

Edit : Everyone, thanks for your suggestions! From the comments, it's clear that this cannot be done through server side code, but just client side code.

*This post is locked for comments

  • gdas Profile Picture
    50,091 Moderator on at
    RE: Run a process(dialog) through c# code

    Hi Aseem,

    You may call an global action in client side script  by passing your parameter and then from action you can invoke your custom workflow with  c# code.

    I am just giving you one alternate suggestion.

    Hope this helps.

  • Aric Levin - MVP Profile Picture
    30,188 Moderator on at
    RE: Run a process(dialog) through c# code

    If you call an action (different type of process), you can have Output parameters. Based on the Output parameter you can call a dialog if necessary. The call to the dialog will still be via Client side code.

    I think what you are probably looking for is the combination of Client and Server side code?

  • Community Member Profile Picture
    on at
    RE: Run a process(dialog) through c# code

    How can this be done?

    From what i have seen, if we throw some error from plugins, an error dialog is thrown by dynamics. Now, how can i bind my dialog to be triggered from dynamics generic error dialog?

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at
    RE: Run a process(dialog) through c# code

    Hi Aseem,

    i dont think you can do that. what you can do is once plugin is done  - you put an alert/exception for the user to may click on a button which will then open the dialog.

  • Aric Levin - MVP Profile Picture
    30,188 Moderator on at
    RE: Run a process(dialog) through c# code

    Yes they are.

    A Dialog is basically a type of synchronous process (or workflow).

  • Community Member Profile Picture
    on at
    RE: Run a process(dialog) through c# code

    Are "Dialogs" and "Dialog Processes" the same?

    I guess they are. If yes, you may be right that "the answer is no" because i didn't find anything online to run the dialogs through server side code.

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,188 Moderator on at
    RE: Run a process(dialog) through c# code

    Not sure I follow completely what you are trying to do.

    A plugin runs on the server side. Dialogs are executed on the client side.

    You can show dialogs in the UI by calling them from script or clicking on the Run Dialog button.

    The link that you specified is the creation of Dialog Processes, but nothing to do with actual execution of dialogs.

    Sorry, but I think the answer is no.

    Hope this helps.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans