Child pages
  • Developing the Mobile Service Solution

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
function ws_read(version,name)
	var questionParams = arguments[arguments.length-1];

	//create return value
	var retval = plugins.mobileservice.createOfflineDataDescription('data_');

	//setting the key for user_select relation
	var authenticate_info = questionParams.ws_authenticate[0];
	globals.username = authenticate_info.username;

	//prepare personal data
	var fs_contact = globals.contact_data$username;//global related foundset using username global var, containing the account manager contact

	 * @type {Array<String>}
	var traverse = new Array();

	retval.addFoundSet(fs_contact, traverse);
	return retval;

Providing/Retrieving Entity(=table) Row



Row/record data is retrieved in separate calls for each entity, for example for 'orders' row data results in a call to 'orders' form is made on ws_read method.
Note: If a prefix is provided in the offlinedata the call will end up at prefix+entityname, example for prefix 'data_' the call happens on form 'data_orders'