PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Adding contacts into a Lotus Notes session
  • Adding contacts into the list of contacts found on the Andoid device
ContactAdd (Example)
Adding contacts into a Lotus Notes session
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)Ajax This example is used to add a contact into a Lotus Notes session. This example uses the mContact structure to perform this addition.
// Start a Lotus Notes session
SessionID is int
SessionID = EmailStartNotesSession("Password", "MarsServer", ...
"email/julia.nsf", "C:\Lotus Notes\julia.id")
// Initialize the variables of Contact structure
ContactReset()
// Fill the variables for the new contact
mContact.Name = "Smith"
mContact.FirstName = "Adriana"
mContact.Email = "adriana.smith@mycompany.com"
// Add the contact
IF ContactAdd(SessionID) = True THEN
Info("Contact added")
ELSE
Error("Error during the addition", ErrorInfo())
END
Adding contacts into the list of contacts found on the Andoid device
AndroidAndroid Widget This example is used to add a contact into the list of contacts found on the Android device. The information regarding the contact is entered in the WIN_NewContact window. The following code corresponds to the validation of this window.
// Local variables
tContact is Contact
tPhone is Phone
tEmail is EmailAddress
 
// Identity
tContact..LastName = EDT_LastName
tContact..FirstName = EDT_FirstName
 
// Phone numbers
// Fixed
IF EDT_HomePhone <> "" THEN
tPhone..PhoneNumber = EDT_HomePhone
tPhone..Type = phoneHome
Add(tContact..PhoneNumber, tPhone)
END
 
// Cell
IF EDT_CellPhone <> "" THEN
tPhone..Number = EDT_CellPhone
tPhone..Type = phoneCellHome
Add(tContact..PhoneNumber, tPhone)
END
 
// Email
IF EDT_Email <> "" THEN
tEmail..Address = EDT_Email
tEmail..Type = emailHome
Add(tContact..Email, tEmail)
END
 
// Add
IF NOT ContactAdd(tContact, gSource) THEN
Error("Unable to create the contact")
ELSE
WIN_TableContacts.RefreshContactList()
Close()
END
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment