cancel
Showing results for 
Search instead for 
Did you mean: 

MDK Web + mobile app

Facundo_Quevedo
Explorer
0 Kudos

Hi experts, I am trying to make my MDK application work for the web, but the problem I am running into is that the master data isn't loading. I have already configured the BTP destination and also pointed the mobile services destination to the BTP destination. I don't know if I am missing a step in the configuration. For more context, the MDK app has offline capabilities.

View Entire Topic
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

The InitializeOffline.action defined in your MDK project is of type Action.Type.OfflineOData.Initialize which is applicable to mobile only. This action type won't work (and is not supported) on MDK web, which is why your MDK web doesn't initialize the service.

As we expanded MDK support for web some time ago, we introduced a new action type Action.Type.ODataService.Initialize that will work for both mobile (online/offline) and web (online only) platforms in a given MK project. This way, you can run the same MDK metadata on both mobile and web platforms(keeping web runtime limitations in mind). 

You can:

  • either update the _Type in your existing InitializeOffline.action (Change OfflineOData to ODataService).
  • OR use a platform function to call different actions on different platforms using $PLT(ios, android, web). 

For example:

 

 

"OnLaunch": ["$(PLT,/MDKApp/Actions/Service/InitializeOffline.action,/MDKApp/Actions/Service/InitializeOffline.action,/MDKApp/Actions/Service/InitializeOnlineWeb.action)"],

 

 

Hope this helps.

Facundo_Quevedo
Explorer
0 Kudos

Hi jitendra thank you it work