简体   繁体   中英

CRM 2011 C# Plugin: Information Message

I want to display an Information message on a CRM 2011 Form (not ERROR message). My plugin is in C#.

After displaying the message, when the user clicks the OK button, I want the form to be automatically closed.

Can anyone help me please with this? Thanks

This isn't possible within a plugin. Suggest you a custom workflow activity and then place it inside a dialog. This will allow two way communication between the user and code.

The only solution to display a "success" message is via javascript. It could be done by creating a hidden checkbox on the form. on the OnLoad function in javascript, a function can be made in order to alert the information message whenever the checkbox is not checked, and then check it in the same function (to indicate that the message was displayed, therefore it will not be displayed again) - setvalue and setsubmitmode("always") should be used to update the checkbox from javascript.

This way, whenever the "Create Post Operation" plugin is launched and ran successfully, the form will display a success message (from javascript), and in case of error it will display and exception message (from the plugin).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM