Sometimes the application needs to check if there are any pending changes to submit to the server, or whether there was any error when sending the data to the server.
The HasEvent method performs this checks.
&HasEvents = SynchronizationEvents.HasEvents(&EventStatus)
Is a variable based on the EventStatus domain and it represents the status of the events to filter. Its possible values are:
Note: If &EventStatus equals 0, then the HasEvents method does not filter by the status of the events.
||Returns false if there are no events with status &EventStatus in the GXPendingEvents table.
||Returns true if there are any event with status &EventStatus in the GXPendingEvents table.
As explained in the SynchronizationEvents external object document, the GXPendingEvents table will be used to store all the changes made in the device in order to send them later to the server. With this method it is possible to check whether there are events in the GXPendingEvents table.
&HasEvents = SynchronizationEvents.HasEvents(1)
Msg("You have events to send!")
As from GeneXus Tilo Beta 2