Dynamics Mobile Studio provides the developer with tools to easily work with data and bind the data to the view’s UI.

Each view contains a special “object” called dataModel. The developer can add properties and functions in the view’s dataModel object and manipulate them during the view life-cycle.

The general idea is to “force” the developer to prepare a set of data for the view during the view loading process and using the view’s data (a.k.a. Data Model ) stored in the memory during the view’s life cycle.

Note that this requires the developer to avoid loading too many data into the data model due to performance reasons.

dataModel:function(){
var me = this;
this.customers = ko.observableArray();
this.load=function(loadingCompleted){
$ma.bo.SLA.Customer.fetchAll(" ","[Name] asc",100,function(selectedCustomers){
me.customers(selectedCustomers);
loadingCompleted()
}
}
},
view_Load:function(completed){
self._dataModel.load(completed);
}

The example above defined a dataModel object for the view with a private property me , public property customers and public method load 

me

the me property is a trick used to solve a javascript characteristic and used in the load function to refer the data model its self. In their programming languages the developer will use the Self keyword, however in javascript we declare a me property pointing to the dataModel and the we use it in the functions.

customers

the customers property is declared as an array. in this case we set the customers property to ko.observableArray() which is a special type of array object coming from the opensource knockoutJS javascript library. The observable arrays can be bound to the user interface controls and the controls will re-render if the value in the observable array changes.

load method

the load method accepts a callback function as argument ( loadingCompleted). The reason is that the view loading process is async and we need to notify the view when the loading process completes in order for the view to render.

The load method in this case selects all customer business objects from the local database sorted by their name limited up to 100 objects. The objects are returned in the selectedCustomer argument and we assigns the selected customer to the customers property of the data model. Then we call the loadingCompleted function to notify the view that we have completed our work here.

Note that the view calls the dataModel’s load method in the view_Load method passing the completed function as a callback. This is where the action starts.

Note that while the code looks pretty nice for a experienced javascript developer it can be quite confusing for the novice developer mostly because of the async nature of the javascript code. It can be een uglier if we need to load multuple dependend business objects which will make us using deep callback nesting .

Dynamics Mobile Studio allows the developer to avoid this by using the View Data Model designer.

 

The data model designer allows the developer to define a set of properties for the data model. The developer can also provide instruction on how the system should load/populate the property with data. It also do not require for the developer to care about callbacks but only provide information about the order of the execution and the nesting of the executions.

The developer can click the Add link to add another property in the data model. The [basket] icon deletes the property. The [^] arrow will move the property up and the [dn-arrow] will move the property down. The [>] icon will nest-in the property in order to instruct the system that the property depends on the upper one and must be populated once the outter property is populated. The [<] icon will nest-out the property.

The [*] icon will open the property edit screen allowing the developer to change the property settings.

 

The developer can change the following settings for the property:

  • One/many : defines if the property is array or not
  • Type: defines the approach used to populate the property with data:
    • b.object
      depending on the One/Many setting , the property will be defined as ko.observable or ko.observableArray
      the property will be populated with business object from the device storage. it is the same as if the developer calls $ma.bo.[XXX].[BusinessObjectName].fetchAll
      the expression in this case contains WHERE_CLAUSE|ORDER_CLAUSE|LIMIT
      example: “[Name] like ‘%100%’|[Name] asc|100
    • remote b.object
      depending on the One/Many setting , the property will be defined as ko.observable or ko.observableArray
      the property will be populated with business object from the remote storage via liveLink. it is the same as if the developer calls $ma.liveLink.fetchAll
      the expression in this case contains WHERE_CLAUSE|ORDER_CLAUSE|LIMIT
      example: “[Name] like ‘%100%’|[Name] asc|100
      the result is
    • sql
      depending on the One/Many setting , the property will be defined as ko.observable or ko.observableArray
      the property will be populated with data from sql select statement. note that the result is an array of records , where each record contains the fields from the selected records
    • context
      depending on the One/Many setting , the property will be defined as ko.observable or ko.observableArray
      the property will be an populated with data from the task’s context. it is the same if the devleoper calls $ma.uiManager.context.get
    • var
      depending on the One/Many setting , the property will be defined as ko.observable or ko.observableArray
      the property will be populated with the value specified in the expression field which is a valid javascript statement
    • simple var
      depending on the One/Many setting , the property will be defined as simple javascript variable or array
      and populated with the value returned from the expression
    • statement
      allows the developer to execute any valid javascript statement/function
    • setting
      depending on the One/Many setting , the property will be defined as ko.observable or ko.observableArray
      the property is populated from $ma.cfgManager.get function. The expression field defines the setting name. Make sure to put ” in front and back of the expressin if it s a string
    • task attrib
      depending on the One/Many setting , the property will be defined as ko.observable or ko.observableArray
      the property is populated from $ma.uiManager.getTaskAttribs
      the expression fiels contains the attribute name. Make sure to put ” in front and back of the expressin if it s a string
    • new b.object
      allows the developer to create a new business object in the local device storage ( e.g. to insert new record in the underlying table)
    • next doc.serie
      depending on the One/Many setting , the property will be defined as ko.observable or ko.observableArray
      allows the develoeper to populate a property with a value of the next number in a specific document number serie.
    • current doc.serie
      depending on the One/Many setting , the property will be defined as ko.observable or ko.observableArray
      allows the develoeper to populate a property with a value of the current number in a specific document number serie.
    • printers
      depending on the One/Many setting , the property will be defined as ko.observable or ko.observableArray
      returns the list of the paired Bluetooth devices. do not have effect in a web browser
  • Data Type: defines the actual datatype of the property.
  • Member name: the name of the property – can be any valid javacript variable identifier
  • Expression: a valid javascript expression ( can be simple string surrounded with “, function returngin result or complex javascript statement returning result). Depending on the Type field the expression can mean different thing, so consult above with the Type field description

The data model definition will be executed when the view is loaded on the screen , but before the view_Load method is executed. It allows the developer to plug in additional logic to further manipulate the data model.

The populated data model can be used in data binding scenarios in order to allow the UI to automatically render data from the data model.

Last Updated: Dec 1, 2015

We provide public releases of our products once a year or more and commit to 12 months support for all public releases. We also provide releases to support the new versions of Microsoft Dynamics NAV and Microsoft Dynamics AX within 12 months after a new version of the ERP is released.

We envision the support as a major component of our effort to provide our customers with mission critical software solutions. We provide support services to customers in order to guarantee their business continuity. Our customer shall report issues or other cases, which requires support. The reporting is performed by authorized personnel from the Customer’s side via the standard support channels described below.

The support is provided in order to:

  • Solve current problems reported by authorized representatives of the Customer on occasion and in connection with Dynamics Mobile
  • Diagnose problems in connection with the standard system functionality
  • Diagnose problems in connection with the functionality customized by Dynamics Mobile team
  • Analyze and eliminate of any “defect” – a mistake in the program code of functionality, whcih affects the Client’s operations

The support services are only provided in response to a support request submitted by authorized personnel from the Customer’s side via any of the support channels:

  • -e-mail: support@dynamcsmobile.com
  • -phone: 00359 2 817 33 63

We provide different response times to support requests based on the request priority as follows:

Priority Reaction time Description
Critical to 2 hour Causes business process block.
Medium up to 8 hours Affects the business process as there are no work around actions.
Low up to 2 business days Low impact issues and requests, which does not affect the system.