function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

validation error on field shows for second than disappears in custom apex page?

I added an error validation on my custom field End Date when End Date is greater than Begin Date on Quote Line Item to show on the field.

This works great in the Salesforce pages.    I have a custom apex:page that has a dataTable with that column that shows the quantity field.

It correctly shows the error on the field for a brief second but it goes away when the page is rerendered.    


I have a try / catch in the custom controller on quote line item update.   But how do I get the error to STAY showing in the data field?


Errors only persist from the most recent transaction. If you have actionSupport, actionFunction, or actionPoller elements, and they fire, they will cause your previous errors to be wiped out. Without seeing your code, I cannot offer an answer to why your code specifically fails. You will need to logically follow through your code and determine what conditions cause a callback to the server.

Generally ,it should not be any problem when you are using rerender.Make sure your pagemessage is outside of that section .

Even you are getting same ,you can set by using a flag validate.On first validation set this validate to be true .In this way you can solve the issue.


Again check whether the pagemessage is outside of that rerender section.