Official Content

The purpose of this article is to explain how to use the RemoveContact method offered by the Contacts external object to delete a contact from a device through an app.

RemoveContactInfo-GX18

The following steps guide you on how to use the method.

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

Go to the Section (General) node located under the Detail node:

RemoveContactMethod-WW-Detail-SectionGeneral-Events

In the Events section define the following event:

Event 'RemoveContact'
    AddressBook.RemoveContact(CustomerName, CustomerLastName, '', '', '')
Endevent

Note: Even though some parameters are not used, they have to be included. That's why some parameters are passed as empty values.

Step 4

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

WW-Detail-SectionGeneral-Layout-AppBar-InsertButton

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