Official Content

The purpose of this article is to explain through an example how to use the ViewContact method offered by the  Contacts external object.

Step 1

Create a Transaction object with the following attributes:

Customer
{
  CustomerId*
  CustomerName
  CustomerLastName
}

Step 2

Apply the Work With pattern to it.

Step 3

Using the ViewContact method you will be able to see in the app the contacts' information stored in the device.

The ViewContact method accepts the following parameters:

VCPARAMETERVIEWCONTACT

FirstName and LastName are mandatory. Email and Phone are optional.

Go to the Work With tab and click on the Section (General) node located under the Detail node:

RemoveContactMethod-WW-Detail-SectionGeneral-Events

Select the Events tab and define the following event:

Event 'ViewInfo'
    AddressBook.ViewContact(CustomerName, CustomerLastName, '', '')
Endevent
Note: The parameters that are not used must be included in the call of the method anyway.

Finally, go to the Layout tab and insert in the Application Bar a button associated with the 'ViewInfo' event:

WW-Detail-SectionGeneral-Layout-AppBar-InsertButton

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