We've got a INotifyPropertyChanged handler that based on certain conditions, adds a warning to the Errors and Warnings tab. The warning appears on the tab, but after a moment it is removed from the list.
How can we get that to appear as long as the order is open?
The handler is bound when the order is opened, and when the specified property is changed the handler fires. Some conditions are checked and if they are satisfied, we just add the warning to the error list. We don't have any code that would clear the IErrorList.
We did have some test packages registered on the development hive, but we've unregistered those so I don't think that there is other code running from another package.
I'm not sure though if I got the moniker right. Does it need to point to the specific property/field, or is enough if it's pointing to the order?
Has there been a resolution to this issue? I'm seeing the same thing in 4.0.3032.25. Specifically--my error or warning does appear in the Errors and Warnings list but only for a few seconds and then it vanishes. I've tried playing around with the 2nd parameter of Uri ctor (screen name) but it's unclear what format the screen name and possible field name should take.
I have been unable to reproduce your issue. Do you close close any of the orders in your package? Is it possible that the error (since it is placed on an IOrderItem) becomes resolved shortly after you add it to the list due to order modifications made by other logic such as a second package?
When I use the code fragment posted on 2/3/15, I do not have any issues. The error continues to be displayed in the error list.
I do not close orders in my package. The errorlist code is in a button handler that performs a rather lengthy process that include writing values to custom fields. If I comment out the time-consuming code then the errorlist code works just fine--the error appears in the list and it remains visible. However, if I re-enable the time-consuming code then I see the "appear then vanish" behavior almost like a race condition.
Also, I noticed on an order that triggers a SoftPro validation rule ("prior policy coverage amount is greater than the policy coverage amount") my added error messages work even with the time-consuming code in place.
All I can recommend without seeing the entirety of your code is to comment out the lengthy portion of your code, then re-enable pieces until you find the sensitivity.