The purpose of this article is to explain through an example how to use the ViewContact method offered by the Contacts external object.
Create a Transaction object with the following attributes:
Customer
{
CustomerId*
CustomerName
CustomerLastName
}
Apply the Work With pattern to it.
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:
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:
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: