Object Configuration
After creating a realtime key on a master data level, it's time to link this realtime key to the object where you want to provide realtime communication.
Method Type
We've introduced a new property on a method instance. It's important to note that if you want to use realtime data communication, we need a way to know what type a specific method has. That's why we've introduced the property 'Type' on a method. You can choose between the following types:
Method Type | Description |
---|---|
MultiRead | This indicates that the method will return multiple records. |
SingleRead | This indicates that the method returns one record. |
Create | This indicates that the method will create a new record. |
Update | This indicates that the method will update an existing record. |
Delete | This indicates that an existing record will be deleted. |
Action | This type is used when it's not entirely clear what a method actually does. For example, a method that invokes a DLL. |
The type 'SingleRead' is required to be set on the method that you have linked to a realtime key in the master data screen. Otherwise you won't be able to select a method in the method setings control.
Three types are used for invoking a realtime key. Create, Update and Delete are all methods than result in a modification of a specific record, so these are the ones we need to watch when providing realtime communication.
Unique Object Field
It's not enough to only configure a type on a method though. You also need to have a unique object field. This unique object field, often a primary key, will be used as input for the single get method linked to the realtime key. You can set 'Enable Realtime Key' to true on the unique object field and then select the modification methods where you want to enable realtime communication for.
In the picture below, you can see that the creation of an employee will trigger a realtime data notification and a delete of an employee and update of an employee will trigger this as well.
View Configuration
All views that use the unique object field as a view field will receive a realtime notification of any modification. Make sure you have the unique object field selected on the view where you would like to see realtime data changes.
There are also some new configuration options in the 'Layout' tab. Here you can modify whether the modified record should change realtime or you would like to see a notification at the top of the view instead. This option is not available for create actions, this will always be a notification unless the refresh interval is enabled. You can also change the colors of the notifications.
Keep in mind that realtime data updates will only be visible on Multi Record Views, Update Views and Single Record Views.
Delete operation
When the delete action is set to realtime, there will still be a notification if a record is deleted on the current page because the page size might not be correct anymore.