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)

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

I have the same question (0)
  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    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.

  • Community Member Profile Picture
    on at

    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.

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Yes they are.

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

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    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.

  • Community Member Profile Picture
    on at

    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?

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    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?

  • gdas Profile Picture
    50,091 Moderator on at

    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.

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