Hi Everyone,

I'm doing some processing after a save has been done within a rather simple cWebView.

The problem is that after the save I need to know that the save was successful because I wish to send an email after the save, but if the save is not successful, naturally, I don't wish to send the email.

So, the question is, how do I know whether or not it was successful?

Interestingly, AFTER a successful save HasRecord is False, which is ok, but Should_Save is True - which doesn't make sense.

BTW, I have thought of setting pbClearAfterSave to False and doing a WebGet of the view's id number and do a find on this id number (at least I know it will be the correct id number), but this is still not really telling me if the save was successful.

Code:
        Object oSubmitBtn is a cWebButton
            Set piColumnSpan to 3
            Set piColumnIndex to 9
            Set psCaption to "Submit"
            Set psToolTip to "Click to submit the information that you've entered"
            Set pbShowWaitDialog to True
            Set psWaitMessage to "Please wait while email is sent."
            
            Procedure OnClick
                Boolean bHasRecord bShouldSave bOkToSendEmail
                Handle hoSvr
                RowID   riMD riPilot
                Integer iCount
                
                Send Request_Save

                Get Server to hoSvr
                Get HasRecord of hoSvr to bHasRecord
                Get Should_Save of hoSvr to bShouldSave

                If (not(bHasRecord) and not(bShouldSave)) Begin
                    Clear BOS
                    Move Sysfile.LastBOS to BOS.Id
                    Find eq BOS by 1 // Id (unique)
                    If (Found) Begin
                        Send ProcessEmail
                    End
                End
            End_Procedure

            Procedure ProcessEmail
                …
                …
            End_Procedure
        End_Object