AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Comunicación / Funciones de contacto (Lotus Notes o Android/iPhone/iPad)
  • 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 - Código ServidorReportes y ConsultasCódigo de Usuario (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
AndroidWidget Android 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.Name = EDT_LastName
tContact.FirstName = EDT_FirstName
 
// Phone numbers
// Fixed
IF EDT_HomePhone <> "" THEN
tPhone.PhoneNumber = EDT_HomePhone
tPhone.Type = phoneHome
Add(tContact.Phone, tPhone)
END
 
// Cell
IF EDT_CellPhone <> "" THEN
tPhone.Number = EDT_CellPhone
tPhone.Type = phoneCellHome
Add(tContact.Phone, 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
Versión mínima requerida
  • Versión 11
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local