IScriptingEventsOnAfterGeneratePrototype Method |
Namespace: SuperOffice.COM.ScriptEvents
Description
This text may be copied to the notepad, and saved as a *.vbs file.
Sub OnAfterGeneratePrototype(DbID) if DbID = 0 then Set myContacts = Database.Find.ContactsByName(Database.GetAssociate(Database.UserAssociateId).FullName & " workday") set myContact = myContacts.GetFirst If myContacts.EOF Then 'No contact exist, create it. Set myContact = Database.CreateContact myContact.SetDefaults myContact.Name = Database.GetAssociate(Database.UserAssociateId).FullName & " workday" myContact.Save End If Set soApnt = Database.CreateAppointment soApnt.SetDefaults soApnt.Contact = myContact soApnt.Description = Now() & ": a new prototype for the central database was generated" soApnt.Save end if End Sub