IContactCancelChanges Method |
Namespace: SuperOffice.COM.SuperOfficeDB
CancelChanges
This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.
This will change the name of the company. If you dont want to save the changes, NO calls the CancelChanges method. If you want to save the changes, YES calls the ChangeIdentity() that saves the contact model to the database.
Dim objSO Dim result Dim id Set objSO = CreateObject("SuperOffice.Application" If not (objSO is nothing) Then id = objSO CurrentContact.Identity objSO.CurrentContact.Name = "This text been changed" result = MsgBox ("The text of the crrent companies name has been changed, do you want to save these changes?", vbInformation + vbYesNo, "SuperCOM") if result = vbYes then objSO.CurrentContact.ChangeIdentity(id) else objSO.CurrentContact.CancelChanges() msgbox "The Company changes was not saved", vbInformation + vbOkOnly, "SuperCOM" end if else MsgBox "Unable to connect to database" end if Set objSO = Nothing