i use browse and update buttons. after i clicked INSERT, then i filled all entry fields then click SAVE. Now then browse refresed. but i want to find the exact point before refresh that, record added or not.
If you are using the ABC templates it can be tricky, because you might think you can get the answer in the Form procedure, but that is not always true.
I believe the best place is in the Browse procedure. If you search in the source code for the name of your Form Update procedure, e.g. UpdateTeachers, you will find code similar to this…
IF SELF.Request = ViewRecord
ReturnValue = RequestCancelled ! Always return RequestCancelled if the form was opened in ViewRecord mode
ELSE
GlobalRequest = Request
UpdateTeachers
ReturnValue = GlobalResponse
END
! [Priority 8500]
! End of "WindowManager Method Executable Code Section"
RETURN ReturnValue
Now you can see what the original request was when the Form was called and what the response was and you can apply your code appropriately.
Another option is TakeCompleted in the form. That is where the actual Insert/Update are performed.
Not sure what you mean. Do you mean you want the same record to be highlighted in the browse before and after the insert? And you want not the record to be highlighted that you just added?
In the form, in “ThisWindow.TakeCompleted PROCEDURE”.
Before “ReturnValue = PARENT.TakeCompleted()” is before saving.
After “ReturnValue = PARENT.TakeCompleted()” is after saving; if ReturnValue is = ZERO, it was saved successfully; if it is <> ZERO after saving, there was an error in saving.