Unofficial Content

You can incorporate behavior to your Native Mobile Applications by adding Actions, that offer different ways to interact with the devices.

This document explains how to schedule a date in the Calendar from your application.

Scope

Generators: Android, Apple

Steps

1. Consider the following Transaction objects:

Customer
{
    CustomerId*
    CustomerFirstName
    CustomerLastName
    CustomerBirthDate
    CustomerPhone
    CustomerEmail
    CustomerAddress

}

Date
{
    DateId*
    DateDescription
    DateStartDate
    DateEndDate
    DateStartTime
    DateEndTime
    DatePlace
    CustomerId
    CustomerFirstName
    CustomerLastName
}

2. Open the Calendar external object and pay attention to the Schedule method:

Calendar External object details Read Only - V18 U8

It has six configurable parameters.

3. Apply the Work With pattern to the Customer Transaction:

image_20242905155_1_png

4. Select the Section(General) node. The next step consists of adding, in the Edit Layout, a new button to the Application Bar (enter "Calendar" for the Event Name).

Customer-WorkWithPattern-SectionGeneralNode-EditLayout-Calendarbutton   

5. By double-clicking on the new action, you can go to the event that is going to be triggered when the action is executed. The event has to contain a call to the Calendar external object and the method Schedule with the parameters needed.

Event 'Calendar'
      Calendar.Schedule(DateDescription,DateStartDate,DateEndDate,DateStartTime,DateEndTime,DatePlace)
Endevent
Note: Even though all the parameters may not be used, it is compulsory to include them in method call. If some are not used, you can include the empty string ("") instead.

Now you have your action configured.

Final result

Android iOS
CalendariOSExample1 - Genexus 15 CalendarAndroidExample1 - Genexus 15

Note: In Android, the scheduled meeting is opened and it is already saved. You have to tap on Cancel if you want to delete it. If you tap the Back button, then the event is saved anyway. That's so by the design of the Android API.

See Also

Calendar external object

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