1
votes

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

2
Why are you preferring plugin? Cant you try with javascript? Can you please explain when you want to show the message?Renjith
@Renjith I want to show a "success" message after the plugin is executed successfully and no error is encountered.Sako Seukunian
What kind of operation (like create, update or validating some fields) are you doing to get the message? My point was cant you try to use javascript where this would have been a direct implementation. If you want a two way communication you may use the approach what james mentioned below. Again depends on your requirement. Still little confused on what you are trying to achieve.Renjith

2 Answers

2
votes

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.

0
votes

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).