i want to hide some fields while the user is in add,edit,gridadd,gridedit. hence i am using CurrentPage()->CurrentAction to identify the page and hide the fields. The issue is that in case there is some error at the database side the user is still in the add/edit mode but the
CurrentPage()->CurrentAction changes to insert,update,gridinsert,gridupdate and the fileds which are supposed to be hidden are available to the user.
incase i add insert,update,gridinsert,gridupdate to the condition to hide the fields. the fields are still hidden if the database operation is successful
ie CurrentPage()->CurrentAction changes to insert,update,gridinsert,gridupdate irrespective of success/failure at the database end.
is there anyway through which i can identify whether the database operation is success or failure so that i can hide the fields on add,edit,gridadd,gridedit and database error