Answered by:
CRM 2011 Warning from plugin without transaction rollback

Question
-
Is there way to send warning messsage to user from plugin, without transaction rollback?Friday, August 5, 2011 5:19 AM
Answers
-
Not possible. The plugin will only be able to display and error message IF the transaction failed. You can use client-side scripts for warning messages.
Gonzalo | gonzaloruizcrm.blogspot.com
- Proposed as answer by Gonzalo Ruiz RModerator Friday, August 5, 2011 12:45 PM
- Marked as answer by Emzil Tuesday, August 16, 2011 10:38 AM
Friday, August 5, 2011 12:45 PMModerator
All replies
-
Not possible. The plugin will only be able to display and error message IF the transaction failed. You can use client-side scripts for warning messages.
Gonzalo | gonzaloruizcrm.blogspot.com
- Proposed as answer by Gonzalo Ruiz RModerator Friday, August 5, 2011 12:45 PM
- Marked as answer by Emzil Tuesday, August 16, 2011 10:38 AM
Friday, August 5, 2011 12:45 PMModerator -
Hi,
I would suggest you the following:
1. Create a new field into the form i.e. new_warning_message (Do not show this field on form)
2. In plugin set the warning text in filed new_warning_message
3. In FomOnload, fetch entity field new_warning_message using Retrieve CRM Web Service SOAP via JScript (Example: http://worldofdynamics.blogspot.com/2011/06/microsoft-dynamics-crm-2011-retrieve.html) check if the entity field new_warning_message has text display it in warning message and then call Update CRM Web Service SOAP via JScript (http://mileyja.blogspot.com/2011/04/how-to-use-update-requests-in-net-and.html) and set new_warning_message field value to null.
*If you will place the warning field on Form then after clearning the field either user have to save form or you have do it via
Xrm.Page.data.entity.save();
Jehanzeb Javeed
http://worldofdynamics.blogspot.com
Linked-In Profile |CodePlex Profile
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".- Proposed as answer by Jehanzeb.Javeed Friday, August 5, 2011 1:12 PM
Friday, August 5, 2011 1:11 PM -
Hi,
I would suggest you the following:
Hi, thx for ur reply.
It's too cumbersome solution for me.
I think Gonzalo Ruiz R gave an answer to a question.
Monday, August 8, 2011 4:03 AM -
Sometimes there is not other way. Thanks! interesting workaround.Tuesday, November 13, 2012 5:30 PM