Skip to content

ODataService Initialize

ODataService Initialize action is used to perform opening and, if needed, the initial creation of offline stores and download of data from the target OData service.

All the properties defined under Action are applicable to this action.

ODataService Initialize Properties

Property Type Required
DefiningRequests DefiningRequest No
ProgressText ProgressText No
Service Service Yes
_Type const Yes

DefiningRequests

List of defining requests. A defining request is an OData read request that the Offline OData will use to retrieves data from the target OData Service and populate in the local offline database

  • type: DefiningRequest[]

All array items must be of the type: DefiningRequest


ProgressText

ProgressText is a set of customizable text for each state to replace the progress indicator text shown during Initialize Offline OData. Specifically for ProgressText.DownloadingFile and ProgressText.DownloadingData properties, user may define dynamic parameter of {0} and/or {1} to display the size and/or size unit. When a state is not specified for customization, default text would be used.


Service

The target service


_Type

  • type: const

The value of this property must be:

"Action.Type.ODataService.Initialize"

Action Result

The ActionResult of this action is null.


Examples

Initialize Offline

{
  "_Type": "Action.Type.ODataService.Initialize",
  "Service": "/MyMDKApp/Services/MyOData.service",
  "DefiningRequests": [
    {
      "Name": "MyProducts",
      "Query": "Products",
      "AutomaticallyRetrievesStreams": true
    },
    {
      "Name": "MyCustomers",
      "Query": "Customers"
    }
  ],
  "ProgressText": {
    "Opening": "Custom Opening Text",
    "Initializing": "Custom Initializing Text",
    "InitialCommunication": "Custom InitialComm Text",
    "StartingDownloadingFile": "Custom Waiting For File Text",
    "StartingDownloadingData": "Custom Waiting For Data Text",
    "Opened": "Custom Opened Text",
    "DownloadingFile": "Custom Downloading File Text {0}{1}",
    "DownloadingData": "Custom Downloading Data Text {1}{0}"
  }
}

Initialize Online

{
  "_Type": "Action.Type.ODataService.Initialize",
  "Service": "/MyMDKApp/Services/MyOnlineOData.service"
}