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¶
[Deprecated. Use ProgressMessages in the service definition's OfflineOptions instead.]
ProgressText consists of customizable texts for each state, replacing the progress indicator text shown during Initialize Offline OData. For the ProgressText.DownloadingFile and ProgressText.DownloadingData properties, you can define dynamic parameters {0} and/or {1} to display size and size unit. If you do not customize a state, the default will display.
Note: If ProgressMessages is defined in the service definition's OfflineOptions, it will take precendence over ProgressText. Refer to the ProgressMessages property in the Service definition for step-level progress customization.
- type: ProgressText
Service¶
The target service
- type: 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"
}