Official Content

The Contacts external object enables you to programmatically manage the contacts of the device.

Contactsexternalobject-Location_2018611142245_1_png image_2018611142341_1_png

Properties

It does not have any.

Methods

AddContact method

It is used to add a contact. Returns True if the operation was successful or the contact is already added. Returns False if any failure occurs and/or the user cancels the execution. If the returned value is not used the event execution cancels.

See HowTo: Use AddContact method from Contacts external object.

Return value Boolean
Parameters FirstName:Character(40), LastName:Character(40) [, Email:Email ] [, Phone:Phone ]
[, CompanyName: Character(40) ] [, Photo:URL ] [, Message:Character(80)]
 

RemoveContact method

It is used to remove a contact. Returns True if the contact was removed successfully. Returns False if any failure such as the following occurs: the contact to be removed is not present in the catalog and/or the user cancels the execution. If the returned value is not used the event execution cancels. 

See HowTo: Use RemoveContact method from Contacts external object

Return value Boolean
Parameters FirstName:Character(40), LastName:Character(40) [, Email:Email ] [, Phone:Phone ] [, Message:Character(80)]
 

ViewContact method

It is used to view the contact information stored in the device.

See HowTo: Use ViewContact method from Contacts external object.

Return value None
Parameters FirstName:Character(40), LastName:Character(40) [, Email:Email ] [, Phone:Phone ]
 

GetAllContacts

Retrieves all the contacts information from the device with their information.

Return value Collection( ContactInfo )
Parameters None
 

Events

It does not have any.


Structured Data Types

ContactInfo

Encapsulates single contact information stored in the device.

  • DisplayName:Character(80)
    Contains the name displayed on the device.
     
  • FirstName:Character(40)
    The contact's first name.
     
  • LastName:Character(40)
    The contact's last name.
     
  • Email:Email
    The contact's e-mail.
     
  • Phone:Phone
    The contact's phone number.
     
  • CompanyName:Character(40)
    The contact's company name.
     
  • Photo:Image
    The contact's photo.
     
  • Notes:Character(200)
    Notes associated with the contact.

Samples

Event 'AddToContacts'
    &IsOK = Contacts.AddContact(PersonName,PersonLastName,PersonEmail,PersonPhone,CompanyName,PersonPhoto,PersonMessage)
Endevent
Event 'RemoveContact'
    &IsOK = Contacts.RemoveContact(PersonName,PersonLastName,PersonEmail,PersonPhone,PersonMessage)
Endevent
Event 'ViewContact'
    Contacts.ViewContact(PersonName,PersonLastName,PersonEmail,PersonPhone)
Endevent
Event 'ViewContactsList'
    &AddressBookContacts = Contacts.GetAllContacts()
Endevent

Notes

See also



Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant