Contacts external object

Official Content
This documentation is valid for:

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

Used to add a contact. Returns True if the operation was successful or the contact is already added, and return False if any failure occurs and/or the user cancels the execution. If the return value is not used the event execution cancels. See HowTo: Using AddContact From Contacts for Smart Devices.

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. True if the contact was removed successfully. False if any failure such as the following occur: the contact to be removed is not present in the catalog and/or the user cancels the execution. If the return value is not used the event execution cancels. See HowTo: Using RemoveContact from Contacts for Smart Devices

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: Using ViewContact Method from Contacts for Smart Devices.

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

GetAllContacts

Retrieves all the contacts from the device with their information.

Return value Collection( ContactInfo )
Parameters None
 

Events

It does not have any.

Structured Data Types

ContactInfo

Encapsulates a single contact information stored in the device.

Example

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

  • RemoveContact and ViewContact methods are only available for iOS.

Scope

Platforms  Web(.NET,Java), SmartDevices(Android,iOS)

Availability

This external object is available as of GeneXus X Evolution 3.

See also




Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.