MOBILE - Implementation Guide EN

Από
MOB-ImplementationGuide EN

Technical guide

Περιεχόμενα

Introduction

The purpose of this document is to provide all the necessary technical information to experienced users who want to change the default application functionality of the platform iOS Entersoft Mobile Suite (ESMobile). In summary, our objectives are:

  • To provide detailed implementation instructions for the individual screens of ESMobile application.

  • To provide information about possibilities to extend the schema or functionality of ESMobile application.

Requirements for using the ESMobile application and this manual include:

  • the knowledge of the environment & how to use each mobile device.
  • the knowledge of all the necessary actions to install and setup the IIS & Application server
  • the correct setup of the required equipment

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

The individual examples of this manual are available for download at the mPortal tool.

Display screens

List (ListForm)

The “ListForm” screen is used to show the records of an entity as a list. To implement it you have to define a command of type ListFormCreatorCommand and a form of type AdvancedList. The screen’s data and the command-form association are specified in the properties of the command, while the layout and the functionality of the screen are specified in the elements of the form. Next in this section, with specific examples, we will give detailed instructions for implementing “ListForm” type screens.

MOB-ImplementationGuide EN-image3.PNGCommand

Example/ Sample1ListForm

Suppose we want to create a screen that displays a list of customer addresses (command: Sample1ListForm). This list will include only the active customers (property: Filter), sorted alphabetically by name (property: OrderBy) and will display information about the customer & his addresses (property: BaseSelect). Let’s also call the form of this screen Sample1ListForm (property: FormID)

<Sample1ListForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.ListFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="Sample1ListForm" />

<Title Type="System.String" Value="Customers" />

<ValidateDataEnabled Type="System.Boolean" Value="false" />

<LoadDataOnOpenForm Type="System.Boolean" Value="true" />

<Filter Type="System.String" Value="ta.Inactive=0" />

<BaseSelect Type="System.String" Value="

Select

p.GID PersonGID, s.GID SiteGID, p.Name,

s.Address, p.eMail eMail, s.Telephone1 Telephone

From ESFITradeAccount ta

Inner Join ESGOPerson p on (ta.fPersonGID = p.GID)

Inner Join ESGOSites s on (s.fPersonGID = ta.fPersonGID)"/>

<GroupBy Type="System.String" Value="" />

<OrderBy Type="System.String" Value="p.Name" />

<SearchPanelID Type="System.String" Value="" />

<SearchPanelFilter Type="System.Xml.XmlElement" Value="" />

<CacheSearchPanel Type="System.Boolean" Value="false" />

<Current Type="System.String" Value="" />

<LeftButtonDefinition Type="System.String" Value="|" />

<MiddleButtonDefinition Type="System.String" Value="|" />

<RightButtonDefinition Type="System.String" Value="|" />

</Params>

</Sample1ListForm>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • The LoadDataOnOpenForm property determines whether or not all records will be displayed when opening a screen. In cases of many data, it is recommended to set this property as False. In this case, data will appear only after editing the filter criteria while at the same time clearing the filter criteria will not cause the refreshing of the list

  • The CacheSearchPanel property determines whether each time the screen opens the chosen filter criteria are kept or cleared (value: True of False respectively).

  • By the proper adjustment of RightButtonDefinition property, the ability of bulk updating the list’s select records is provided (see section Ideas & Solutions/ ListForm/ Data bulk update)

Filter records

You can have alternative filter criteria on a list of records, by defining the property SearchPanelFilter. The definition of the individual criteria depends on the type of the column we want to apply the filter to. The available types are: FieldChooser, Datefield, DropDown, Boolean, ColumnNames & Clear.

Suppose we want to add filters in our example screen, based on the following criteria:

  1. Name or Telephone or E-mail. In the Telephone filter we want to display the numeric keyboard (keyboard=”num”) while in the E-mail filter we want to search with type “contains” (name="*p.eMail*")

<SearchPanelFilter Type="System.Xml.XmlElement" Value="">

<element type="FieldChooser" minimumInput="" id="1">

<column name="p.Name*" title="Name"/>

<column name="s.Telephone1*" title="Phone" keyboard="num" />

<column name="*p.eMail*" title="E-mail" />

</element>

  1. Area & Zip code. In these filter criteria we want the user to be able to choose from a drop down list. We also want to limit the values appearing in the drop down list for Zip Code filter, according to the selected value of the Area filter.

<element type="DropDown" id="2">

<column>s.Area</column>

<query>

Select distinct Area From ESGOSites

MOB-ImplementationGuide EN-image4.pngWhere Area is not null

Order by Area

</query>

<default>All</default>

<title>Area</title>

</element>

<element type="DropDown" id="3">

<column>s.fPostalCode</column>

<query>

Select distinct fPostalCode From ESGOSites

Where fPostalCode is not null

Order by fPostalCode

</query>

<default>All</default>

<title>Postal code</title>

<binding bindelement="2" filter="Area"/>

</element>

  1. Address type with default value “HEADQUARTERS”

<element type="DropDown" id="4">

<column>s.fSiteTypeCode </column>

<query>

Select distinct fSiteTypeCode From ESGOSites

Order by fSiteTypeCode

</query>

<default>All</default>

<selectedvalue>HEADQUARTERS</selectedvalue>

<title>Address type</title>

</element>

Alternatively, the selected value can be defined via a query statement

<element type="DropDown" id="4">

<column>s.fSiteTypeCode </column>

<query>

Select distinct fSiteTypeCode From ESGOSites

Order by fSiteTypeCode

</query>

<default>All</default>

<selectedvalue>query: Select Code From ESGOZSiteType Where Code = 'ΕΔΡΑ'</selectedvalue>

<title>Address type</title>

</element>

  1. Person Type (Company/Individual) with default value “Company”.

<element type="Boolean" id="5">

<column>p.PersonKind</column>

<truetext>Company</truetext>

<truevalue>0</truevalue>

<falsetext>Individual</falsetext>

<falsevalue>1</falsevalue>

<nonetext>All</nonetext>

<defaultvalue>0</defaultvalue>

<title>Person kind</title>

</element>

  1. Finally, there should be an option to clear all filters to their default value.

<element type="Clear" id="6"/>

</SearchPanelFilter>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

  • The use of dynamic criteria is available both in defining the value of another criterion and in defining a column of the list (see section Ideas & Solutions/ ListForm/ Dynamic criteria & columns)

  • The ability to adjust search criteria behavior by defining the preferable character matching algorithm is provided (see section Ideas & Solutions/ ListForm/ Sound search)

Sort records

Suppose in our example screen, in addition to order based on Name (property: OrderBy), we want to add the option to order the records ascending or descending by Area (property: SortBy).

<OrderBy Type="System.String" Value="p.Name" />

<SortBy Type="gr.entersoft.esmobile.SortBy">

<Definition>

<SortByField Caption="Area" ESCaptionID = "" Expression="s.Area" Default="false" />

<SortByField Caption="Area desc" ESCaptionID = "" Expression="s.Area desc" Default="false" />

</Definition>

</SortBy>

Note here that if we want to override the criterion that is set on the property OrderBy, we can set one of the alternative criteria as the default sorting criterion for the list. So, in our example to set “Area” as the default sorting parameter, the definition should be as follows:

<OrderBy Type="System.String" Value="p.Name" />

<SortBy Type="gr.entersoft.esmobile.SortBy">

<Definition>

<SortByField Caption="Area" ESCaptionID = "" Expression="s.Area" Default="true" />

<SortByField Caption="Area desc" ESCaptionID = "" Expression="s.Area desc" Default="false" />

</Definition>

</SortBy>

If there are alternative sorting parameters in the command, this button MOB-ImplementationGuide EN-image12.png “Sort” appears on the top right part of the screen. By pressing this button we have the option to switch between the available sorting criteria.

MOB-ImplementationGuide EN-image3.PNG

Form

Example/ Sample1ListForm

In our example screen, suppose that we want to show the columns: Name, Address, E-mail & Telephone (form: Sample1ListForm/AdvanceList). For each of these columns we must define the corresponding command field (property: CellSource) and the desired name & display position of the column (properties: Name & Bounds respectively).

This definition must be made twice for the normal & the selected record. This means that in the form file we should have two RowTemplates the 1st for the normal and the 2nd for the selected record.

<DSAdvancedList xmlns="http://www.rescodeveloper.net/schemas/DSAdvancedList.xsd%22>

<AdvancedList>

<RowTemplate>

<Property Name="Name" Value="RowTemplate" />

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="0,0,100,16" />

<Property Name="CellSource" Value="Name" />

<Property Name="Name" Value="Name" />

<Property Name="DesignName" Value="" />

</Cell>

<Cell Type="Resco.Controls.AdvancedList.TextCell">...

<Cell Type="Resco.Controls.AdvancedList.TextCell">...

<Cell Type="Resco.Controls.AdvancedList.TextCell">...

<Property Name="Height" Value="24" />

</RowTemplate>

<RowTemplate>

<Property Name="Name" Value="SelectedRowTemplate" />

<Cell Type="Resco.Controls.AdvancedList.TextCell">...

<Cell Type="Resco.Controls.AdvancedList.TextCell">...

<Cell Type="Resco.Controls.AdvancedList.TextCell">...

<Cell Type="Resco.Controls.AdvancedList.TextCell">...

<Property Name="Height" Value="24" />

</RowTemplate>

</AdvancedList>

</DSAdvancedList>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • The elements of the Selected template can be different than the ones for the Normal template.

  • The 4 values of the property Bounds define: x, y, width & height respectively considering 240 as the maximum width of the screen.

Column formatting

In a screen of type “ListForm” and by defining the line’s AdvancedList properties, we have the following format capabilities by column type:

  • Number. Declaring the display format is performed via the property FormatSting. Some of the typical options are:
Definition Result Definition Result
{0:G} 16325,62 {0:P} or {0:0.00\%} 163,26 %
{0:C} 16.325,62 € {0:#,0} 16326
{0:N} or {0:#,#.00} 16.325,62
  • Font. Formation refers to the size (property FontSize), the color (property ForeColor) and the style (property FontStyle) of the font. The supported options for color are: Blue, Brown, Cyan, Gray, Darkgray, Green, Lightgray, Magenta, Orange, Purple, Red, White and Yellow, while for style are: Bold and Italic.
  • Alignment. Declaring the alignment of the content of a column is performed via the property Alignment.
  • Wrapping. Wrapping the contents of a column, is provided by declaring in property AutoHeight the value True. In order to predetermine the preferable number of lines, the declaration of property Lines is also required.

Suppose that in our example screen we want to format the element “Name”. To do this we must change the screen’s form (Sample1ListForm/AdvandedList) and set the desirable values to the properties ForeColor, FontStyle & FontSize.

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="CellSource" Value="Name" />

<Property Name="Name" Value="Name" />

<Property Name="ForeColor" Value="orange" />

<Property Name="FontStyle" Value="bold" />

<Property Name="FontSize" Value="14" />

</Cell>

Column Titles

Let’s add an area in our example screen, to show the title of each column. We must change the screen’s form file (Sample1ListForm/AdvandedList) and add a new RowTemplate to include the element of type “title”. The special feature of this element is that the property CellSource must be like "&quot;Title&quot;", where the quot; indicates the quote character ( ‘ ).

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="3,0,97,15" />

<Property Name="CellSource" Value="&quot;Person&quot;" />

<Property Name="Name" Value="Name" />

<Property Name="DesignName" Value="" />

<Property Name="ForeColor" Value="white" />

</Cell>

MOB-ImplementationGuide EN-image20.PNGThen to show the title area, we give to the property ShowHeader the value True and in the section HeaderRow we define the property TemplateIndex and set the RowTemplate by giving the value of its seq. numbering.

<AdvancedList>

<RowTemplate>

<Property Name="Name" Value="RowTemplate" />

<RowTemplate>

<RowTemplate>

<Property Name="Name" Value="SelectedRowTemplate" />

<RowTemplate>

<RowTemplate>

<Property Name="Name" Value="Header" />

</RowTemplate>

<Property Name="ShowHeader" Value="true" />

<HeaderRow>

<Property Name="TemplateIndex" Value="2" />

<Property Name="StringData" Value="" />

</HeaderRow>

</AdvancedList>

Action buttons

MOB-ImplementationGuide EN-image21.PNGExample/ Sample2ListForm

To add some functionality to the form, we must edit the AdvancedList file and in the selected record’s RowTemplate add a new element of type ButtonCell. In this element, we define the name of the command we want to execute (property: Name) and screen-command “connecting” field (property: CellSource).

If we want to extend the screen of our example (form: Sample2ListForm/AdvancedList) to have the following actions:

  1. Switch to a screen that displays the full details of this customer (command: CustomerEditForm)

<RowTemplate>...

<RowTemplate>

<Property Name="Name" Value="SelectedRowTemplate" />

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Customer" />

<Property Name="ImageDefault" Value="iVBO…" />

<Property Name="CellSource" Value="PersonGID" />

<Property Name="Name" Value="Edit#CustomerEditForm" />

<Property Name="DesignName" Value="#82#22" />

<Property Name="Selectable" Value="true" />

</Cell>

</RowTemplate>

  1. Call the add new order screen for this customer (command: NewDocumentFromSite)

<RowTemplate>...

<RowTemplate>

<Property Name="Name" Value="SelectedRowTemplate" />

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Sales order" />

<Property Name="ImageDefault" Value="iVBO…" />

<Property Name="CellSource" Value="SiteGID" />

<Property Name="Name" Value="Doc#NewDocumentfromSite#1" />

<Property Name="DesignName" Value="#82#22" />

<Property Name="Selectable" Value="true" />

</Cell>

</RowTemplate>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

The order that these actions are displayed depends on the order they are saved n the AdvancedList file.

Button settings

Concerning the action buttons functionality, the following settings, per property, must be applied:

Text

The text used as the button’s caption.

ImageDefault

The image used as the button’s icon. Note that, in lists with the extension of a dashboard screen, the declaration of an icon is unnecessary.

DesignName

The “specifications” regarding the visibility of the button. It consists of the following two parts:

  • The button’s hiding conditions described in the following form [NA]condition 1;condition2[NA]
  • The apps in which the button is available described in the following form #AppID1#AppID2 (22-Service, 82-SFA & 322-xVan)

e.g. (a) to prevent cancelation of canceled or canceling doc and (b) to be hidden in Service application

<Property Name="DesignName" Value="[NA]CancelState=1;CancelState=2[NA]#82#322" />

CellSource

The screen-command “connecting” field. The specified field feeds one of the variables [PARENT] or [CURRENT].

Name

The “specifications” regarding the button’s command execution. The declaration varies significantly depending on the command type. The appropriate settings, per case, are:

  • Button regarding the add new action

New#Command combines with [PARENT] variable

Note that, in special cases where there is a need of a 2nd variable, it also combines with [CURRENT] variable. The field that feeds this 2nd variable is declared as the button’s suffix.

e.g. button add new Count based on a merchandizing plan

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Count" />

<Property Name="CellSource" Value="CampaignGID" />

<Property Name="Name" Value="New#AutoCreateMerchandising#SiteGID" />

<Property Name="DesignName" Value="#82#322" />

<Property Name="Selectable" Value="true" />

</Cell>

  • Alternative declaration of button regarding the add new action (applies only to documents)

Doc#Command#DocType combines with [PARENT] variable but also requires declaring the document type as the button’s suffix.

e.g. button add new Order (document type: 1) via calendar screen

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Order" />

<Property Name="CellSource" Value="TaskGID" />

<Property Name="Name" Value="Doc#NewDocumentfromApp#1" />

<Property Name="DesignName" Value="#82#322" />

<Property Name="Selectable" Value="true" />

</Cell>

  • Button regarding the view action of a selected record / list of records

Edit#Command combines with [CURRENT] variable

  • Button regarding actions altering based on a condition

CASE#ColumnAlias#Value1#Command1#ColumnAlias#Value2#Command2 combines with [CURRENT] variable

e.g. button that alters the action based on task type

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="View" />

<Property Name="CellSource" Value="TaskGID" />

<Property Name="Name"Value="CASE#TaskIntID#es.stk#TodoEditForm#TaskIntID#es.com#EditComplaint#EditTask"/>

<Property Name="DesignName" Value="#82#322" />

<Property Name="Selectable" Value="true" />

</Cell>

  • Button regarding buttons altering based on a condition

ESCASE[#]ColumnAlias[#]Value1[#]Button1[#]ColumnAlias[#]Value2[#]Button2 combines dynamically with [CURRENT] variable (Edit type button) or with [PARENT] variable (New type button).

Note that, in special cases where there is a need of a 2nd variable, the field that feeds this 2nd variable is declared as the button’s suffix

e.g. button that alters the action button based on task type

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="List" />

<Property Name="CellSource" Value="PersonGID" />

<Property Name="Name" Value=

"ESCASE[#]isVisit[#]1[#]Edit#PersonAffiliationListForm[#]Edit#TaskRecipientCollection#TaskGID@Parent" />

<Property Name="DesignName" Value="#10242#10243#10244" />

<Property Name="Selectable" Value="true" />

</Cell>

Dashboard

Example/ Sample3ListForm

A dashboard screen enables the ergonomic display of information and actions available for the selected record. It can show data from a record and also from other entities connected to this record. Data are displayed for information purposes only and the user cannot edit them.

The definition of a dashboard screen is made in the file ExtraLayoutParams.xml of the form. With the configuration of the file parameters, we can re-define the layout of the records list and re-allocate the available components into separate sections or buttons of the screen. To switch to the dashboard screen all we have to do is select a record of the list.

Suppose we want to extend the screen of out example to:

  1. Show the customer information: VAT number, Occupation, Family, basic contact information and some basic financial data.
  2. Display the customer information screens: Full details, Contacts, To do tasks, History of Appointments & Sales and online Customer ledger & Age balances.
  3. Enable creating: new Order & new Collection.

Let’s also assume that, given the size of information & actions we choose to display them as a dashboard screen (form: Sample3ListForm/ExtraLayoutParams)

Customer information

MOB-ImplementationGuide EN-image22.pngFirst, we have to define the parameters referring to the records list layout. The settings required to format our screen like the screenshot below are:

MOB-ImplementationGuide EN-image24.pngTo add a special label to the list so that the customer headquarters shows a check icon, we have to include this information in the command query of this screen (Sample3ListForm) and also define the file ExtraLayoutParams of the form, where we set the field associating the record – to the image file (property: imagecolumn) and the folder where the image file is saved (property: imagefolder).

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

MOB-ImplementationGuide EN-image26.PNGEach record of the list takes up two lines and can display a column of type icon and two data columns per line maximum. It is not possible to further format the list.

To make the dashboard screen like the screenshot, all we have to do is place the elements for the extra customer information. Note that it is essential this information is included in the query of the command associated with this form (command: Sample3ListForm).

<layoutparameters>

<extraparams title="Identity" id="1"> <extraparam>

<name>TaxRegNumber</name>

<caption>T.R.N</caption>

<type>text</type>

</extraparam>

<extraparam>

<name>ActivityDescription</name>

<caption>Activity</caption>

<type>text</type>

</extraparam>

<extraparam>

<name>FamilyDescr</name>

<caption>Family</caption>

<type>text</type>

</extraparam>

</extraparams>

<extraparams title="Communication" id="2">...

<extraparams title="Commercial data" id="3">...

</layoutparameters>

Actions

The next step is to add the option to call an information screen or to create a record action from the dashboard screen. First, as usual, we must define the actions in the AdvancedList file of the form (form: Sample3ListForm/AdvancedList). In this phase, all the actions we added will appear as distinct options in the button MOB-ImplementationGuide EN-image27.png“Information”. Then we could, for usability reasons, integrate these actions into distinct sections or buttons on the dashboard.

Suppose we want the information screens: Contacts, To do tasks, History of Appointments & Sales to appear on distinct sections of the dashboard screen. The settings required are:

MOB-ImplementationGuide EN-image28.PNG

Also let’s say we want to differentiate the actions that require an online connection to the server, the information screens for Customer ledger & Age balances, by putting them in the button MOB-ImplementationGuide EN-image32.png“Online”. The settings required are:

<layoutparameters>

<Segments>...

<newactions>

<newaction>

<command>Edit#HtmlCommand_CustomerLedger</command>

<subcommand>false</subcommand>

<online>true</online>

</newaction>

<newaction>

<command>Edit#InfoCommand_Customer_Balance_Age_Analysis</command>

<subcommand>false</subcommand>

<online>true</online>

</newaction>

</newactions>

</layoutparameters>

Then to differentiate the actions that create new records, the screens for new order or collection will appear in the button MOB-ImplementationGuide EN-image33.png“Actions”. The settings required are:

<layoutparameters>

<Segments>...

<newactions>

<newaction>

<command>Doc#NewDocumentfromSite#1</command>

<subcommand>false</subcommand>

<online>false</online>

</newaction>

<newaction>

<command>Doc#NewDocumentfromSite#51</command>

<subcommand>false</subcommand>

<online>false</online>

</newaction>

</newactions>

</layoutparameters>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • All actions that exist in the AdvancedList file of the form and are not displayed in a section or button of the dashboard will appear under the button “Information”.

  • We can also limit the available options in the button “Actions” so that initially only the “popular” appear and by pressing the more button “…” all options are displayed. The settings required are:

  1. Add an action with name “More” in the AdvancedList of the form.

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="..." />

<Property Name="Name" Value="More" />

<Property Name="DesignName" Value="#82#22" />

<Property Name="Selectable" Value="true" />

</Cell>

  1. Add this action to the file ExtraLayoutParams and set the property “Subcommand” to True to the not popular options.

<newactions>

<newaction>

<command>Doc#NewDocumentfromSite#51</command>

<subcommand>true</subcommand>

</newaction>

<newaction>

<command>More</command>

</newaction>

</newactions>

Standard buttons

The dashboard screen, besides the buttons Actions, Online & Information also has the following pre-defined action buttons. To set their functionality we must define specific parameters in the file ExtraLayoutParams.xml.

Button Parameter Functionality
onclickcommand Switch, by clicking on a record of the list, to the data entry screen of the current record.
alertcommand Display an informative message when focusing on record (see section Ideas & Solutions/ ListForm/ Conditional info message)
MOB-ImplementationGuide EN-image34.png detailcommand Switch to the data entry screen of the current record. Note that, via parameter onclickcommand, the ability of direct transition to data entry screen, without prior appearance of the dashboard, is provided.
MOB-ImplementationGuide EN-image35.png attachmentcommand Switch to “Attached documents” screen. From this screen the ability to manage current record’s attachments is provided.
MOB-ImplementationGuide EN-image36.png dropboxcommand Switch to the Dropbox screen.

Selection list (InvForm)

A screen of type “InvForm” is in most cases called by a data entry screen or a view record screen and is used as a tool to search for & assign value to a field of the screen from which the call is made. To implement it we must define a command of type IvnFormCreatorCommand and a form of type AdvancedList.

Regarding the required command & form settings of the InvForm screen, the same rules apply as those described above for the ListForm screen. In this section, using specific examples, we will refer to the special characteristics of InvForm and the additional functionality of special screens of this type such as the Modal screen and the Item selection screen.

Typical selection list

Example/ ClassicInvForm

Suppose we want to implement a screen which will be used as the address selection list in competition’s data entry screen. Let’s say that the specifications for the data and the layout of this selection list are identical to those in example Sample1ListForm.

Command

We create a new command (command: ClassicInvForm) by copying the command Sample1ListForm and then make some changes to convert the ListForm to an InvForm screen. The required settings are:

  1. Change the command type from ListFormCreatorCommand to InvFormCreatorCommand
  2. Add the property FilterBy. In an InvForm screen, this property is mandatory even if it does not have a value. If we want to limit the available options based on the content of other fields of data entry screen, then we must define the filter criteria in this property. The definition should be like:

Column1 of list#=#Field1 of data entry screen,Column2 of list#=#Field2 of data entry screen etc.

In our example, ie in order to filter the address selection list based on the person of the record we must define: p.GID#=#fPersonGID.

  1. Add to the query a column with the alias GID. This column must be the unique identification key of the selected record and must refer to the field to be assigned. In our example, since the selection list will be used for filling the “Address” field, the GID column must refer to Site entity GID.

<ClassicInvForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="Sample1ListForm" />

<FilterBy Type="System.String" Value="p.GID#=#fPersonGID" />

<BaseSelect Type="System.String" Value="

Select

p.GID PersonGID, p.Name,

s.Address, p.eMail eMail, s.Telephone1 Telephone,

s.GID GID

From ESFITradeAccount ta

Inner Join ESGOPerson p on (ta.fPersonGID = p.GID)

Inner Join ESGOSites s on (s.fPersonGID = ta.fPersonGID)"/>

<GroupBy Type="System.String" Value="" />

</Params>

</ClassicInvForm>

Form

Since based on our specifications, the layout of the selection list is identical to the list form we don’t have to create a new form. We can just connect the command to the existing form Sample1ListForm.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

Regarding the available ways of calling screens of type “InvForm” by a data entry screen, the same rules apply as those described below for named task screens (see section Data entry screens/ Named task (EditForm)/ Display elements/ ItemLink)

Modal screen

Example / SampleMODALInvForm

Suppose we want to implement a screen which will be used as a bulk update tool of Site’s field “Flag-1”.

Command

We create a new command (command: SampleMODALInvForm) by copying the command ClassicInvForm and then make some changes to convert the classic InvForm to a Modal screen. The required settings are:MOB-ImplementationGuide EN-image37.PNG

  1. Set the properties Modal & MultiSelect to true is a prerequisite. Note that, via the command’s SelectaAllEnabled property, the button Select All is also available.
  2. Place GID column (the column that refers to the unique identifier of a selected record) as the 1st column of the query.
  3. Set on the command’s property OnSelectCommand by defining the preferable command, which for our example is the bulk update Site’s field “Flag-1” command (command: SampleMODALInvFormAction). Note that, via the DoneButtonTitle property, the ability to rename the screen’s “Select” button is given.

<SampleMODALInvForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="SampleMODALInvForm" />

<Modal Type="System.Boolean" Value="true" />

<MultiSelect Type="System.Boolean" Value="true" />

<SelectaAllEnabled Type="System.Boolean" Value="true" />

<OnSelectCommand Type="System.String" Value="SampleMODALInvFormAction" />

<DoneButtonTitle Type="System.String" Value="Update" />

<BaseSelect Type="System.String" Value="

Select

s.GID GID, p.GID PersonGID, s.GID SiteGID, p.Name,

s.Address, p.eMail eMail, s.Telephone1 Telephone

From ESFITradeAccount ta

Inner Join ESGOPerson p on (ta.fPersonGID = p.GID)

Inner Join ESGOSites s on (s.fPersonGID = ta.fPersonGID)"/>

</Params>

</SampleMODALInvForm>

Form

Since the Modal screen form should have only two RowTemplates of which the 1st must refer to the normal and the 2nd to the selected record, we have to create a new form (form: SampleMODALInvForm) as a copy of the Sample1ListForm form and delete the RowTemplate referring to Titles area.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

In order the Modal screen special functionality to be activated, the direct assignment of screen to a main menu entry or a dashboard page entry is a prerequisite.

Lines adding screen

Example / Special1InvForm & Special2InvForm

MOB-ImplementationGuide EN-image38.PNGSuppose we want to implement a screen that will be used as MOB-ImplementationGuide EN-image42.pngItems selection list in the order data entry screen. We create as usual, the command file (command: Special1InvForm) & the form file (form: Special1InvForm/AdvancedList) and integrate the selection list on the order data entry screen. In this phase, the selection list attains automatically the multiple selection functionality and has no other differences from a typical selection list. Note that, via the command’s SelectaAllEnabled property, the button Select All is also available.

“ItemInvForm” screen type

Just by changing the name of the form from Special1InvForm to Special1ItemInvForm the list automatically inherits the following functionality:

  • Ability to enter quantity either by typing directly or by using the increase/decrease quantity buttons.
  • Ability by using keys MOB-ImplementationGuide EN-image43.png & MOB-ImplementationGuide EN-image44.png, to register a line comment & undo selection.
  • Ability to choose the measurement unit. This feature is available in documents only.
  • MOB-ImplementationGuide EN-image45.PNGAbility to mass quantity registration for a set of records.

Suppose we want to implement a screen that will be used as MOB-ImplementationGuide EN-image47.pngCatalogue item selection list in the count data entry screen. We also want the list to have the ability for “Mass selection”. We create as usual, the command file (Special2InvForm) & form file (Special2ItemInvForm/AdvancedList) paying attention to include the part ItemInvForm in the form name and we include the selection list on the count data entry screen.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • Be aware that the data assigned to GID column define a unique identifier of each selected record.

e.g. for a selection list of competition items when the same item is provided by many competitors

<TaskItemCompetitorCatalogueInvForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvFormCreatorCommand">

<Params>

<BaseSelect Type="System.String" Value="

select

c.GID fCatalogueItemGID, p.GID fPersonGID,

c.GID || || p.GID GID,c.Code Code, c.Description Description, p.Name Competitor

from ESMMCatalogueItem c

left join ESMMPersonItem pi on (pi.fCatalogueItemGID = c.GID)

left join ESGOPerson p on (p.GID = pi.fPersonGID) " />

</Params>

</TaskItemCompetitorCatalogueInvForm>

  • In the command query of the form of type “ItemIvForm” it is mandatory to have the columns GID and Qty, where Qty should have a value with format 1.0. Especially in the case we want to activate the ability to choose the measurement unit we must also include the columns fMUCode & fItemMUGID.

<BaseSelect Type="System.String" Value="

select GID,Code,Description,fItemGroupCode,Manufacturer,

Price, Discount, 1.0 Qty, fMUCode, fItemMUGID

From ESFIItem i " />

Image type column

Example/ CompetitorLogoInvForm

In the InvForm we can display an image related to the list records. To activate this feature we must save, in the device folder ProductImages, the image files and name those files with the code of the record. At the same time, we can configure the command to differentiate the default image display parameters. The differentiation exists in the field that associates record – image file as well as the type & folder of the image files.

MOB-ImplementationGuide EN-image48.PNGSuppose we want to implement an InvForm screen that will be used as MOB-ImplementationGuide EN-image42.png Items selection list in the competition entry. Suppose also that we want to show the logo of the competitor, who distributes the product, in an image column of the list. We must assign the values we want in the properties ImageColumn, ImageDirectory & ImageExtension of the command (command: CompetitorLogoInvForm).

<CompetitorLogoInvForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvFormCreatorCommand">

<Params>

<BaseSelect Type="System.String" Value="

select …

p.Name Competitor,…

from ESMMCatalogueItem c

left join ESMMPersonItem pi on (pi.fCatalogueItemGID = c.GID)

left join ESGOPerson p on (p.GID = pi.fPersonGID) " />

<ImageColumn Type="System.String" Value="Competitor" />

<ImageDirectory Type="System.String" Value="CSImages/Logo" />

<ImageExtension Type="System.String" Value="png" />

</Params>

</CompetitorLogoInvForm>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

Focusing on the image it is automatically magnified and the ability either to display the item’s detailed screen or to send the image via e-mail is given.

Data entry screens

Data entry screens are used for data entry or to view the information of a specific record. To implement a data entry screen we must define a command – its type depends on the “class” of the entity it manages and a form of type DetailView. Especially in the case of a data entry screen that has header & lines, we have to attach a form and actions regarding the appearance and the functionality of the lines. Next in this section we will reference the available entity classes and the special characteristics, per case, of their data entry screen.

Master entity (EditForm)

Example/ Sample1DetailForm

To implement data entry screens for master entities (Item, Customer, Address, etc.) we must define a command of type NewFormCreatorCommand or EditFormCreatorCommand for add new or edit respectively, and a form of type DetailView.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • To ensure the ESMobile application seamless upgrade, when we make an EditForm custom, we must also make the related command custom. This rule applies even if we have not made any changes to the command.

  • If we want the user not to be allowed to edit the entity, we can set the value False to the command property Editable. If we want to prohibit editing for a specific element, we can configure it in directly in the form by setting False to the property Enabled of this element. Based on product configuration, editing is also not allowed when the field RecordState of the record is set to 1.

Suppose we want to change the default display format for viewing MOB-ImplementationGuide EN-image52.pngView the Item elements based on the following specifications (form: Sample1DetailForm/DetailView):

MOB-ImplementationGuide EN-image53.PNG

  1. Hide the elements: Vat category, Color, Size & Inactive.

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="Label" Value="VAT category" />

<Property Name="DataMember" Value="VATCategory" />

<Property Name="Name" Value="VATCategory" />

<Property Name="Visible" Value="False" />

</Item>

  1. Remove the page “Defined” and transfer the elements Text-2 & Date-1 of this page to the “General” page. Rename the fields to Detailed description & Production date respectively.

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="Label" Value="Detailed description" />

<Property Name="DataMember" Value="StringField2" />

<Property Name="Name" Value="StringField2" />

<Property Name="WordWrap" Value="True" />

<Property Name="MultiLine" Value="True" />

</Item>

<Item Type="Resco.Controls.DetailView.ItemDateTime">

<Property Name="Label" Value="Production date" />

<Property Name="DataMember" Value="DateField1" />

<Property Name="Name" Value="DateField1" />

<Property Name="NoneText" Value="" />

</Item>

  1. Add an element for Material type. Note that, since this field is not included in the command’s select query, we must edit the command and add it.

<Item Type="Resco.Controls.DetailView.ItemComboBox">

<Property Name="Label" Value="Material type" />

<Property Name="DataMember" Value="MaterialType" />

<Property Name="Name" Value="MaterialType" />

<Property Name="StringData" Value="0-Merchandise,1-Product,3-Spare part,4-Consumable" />

<Property Name="Visible" Value="True" />

</Item>

Named task (EditForm)

Example/ Sample2DetailForm

To implement a data entry screen of a named task (Sales appointment, Sales task & Case) we have to define a command of type NewFormCreatorCommand or EditFormCreatorCommand for add new or edit respectively and a form of type DetailView.

Regarding the required form settings, the same rules apply as those described above for the master entity screen. In this section, using specific examples, we will refer to the special characteristics of the DetailView form.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • To ensure the ESMobile application seamless upgrade, when we make a named task form custom, we must also make the related command custom. This rule applies even if we have not made any changes to the command.

  • By setting the command’s Editable property as False, the data entry screen is characterized as read only. On the other hand, by setting the form’s Enabled property as False the ability to characterized specific fields as not editable is given. Finally, the ability to define custom conditions that characterize a data entry screen as read only is also provided.

e.g. to ban data entry on a closed appointment that is already sent to back office

  1. Add in the select query of appointment’s edit screen command (command: AppointmentEditForm) a column that has the alias RecordState and that defines the read only condition.

<AppointmentEditForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.EditFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="AppointmentEditForm" />

<Title Type="System.String" Value="Edit appointment" />

<Filter Type="System.String" Value="app.GID = '[CURRENT]'" />

<BaseSelect Type="System.String" Value="

select …

case when app.State in (2,3) and app.RecordState=1 then 1 else 0 end RecordState

from ESTMAppointment app

left join ESTMTask t on t.GID = app.GID

left join ESTMStatus st on st.TaskType = 'app' and st.State = app.State

left join ES00Comment c on c.fGID = app.GID" />

</Params>

</AppointmentEditForm>

  1. Add in appointment’s edit screen form an element referring to RecordState column.

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="DataMember" Value="RecordState" />

<Property Name="Visible" Value="false" />

<Property Name="Name" Value="RecordState" />

</Item>

Suppose we want to change the default display format for viewing MOB-ImplementationGuide EN-image52.pngView the Case elements based on the following specifications (form: Sample2DetailForm/DetailView):

Display elements

TextBox

  1. Show all the content for the element Text-1 in page “User-defined”.

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="Label" Value="Text 1" />

<Property Name="DataMember" Value="StringField1" />

<Property Name="Name" Value="StringField1" />

<Property Name="WordWrap" Value="True" />

<Property Name="MultiLine" Value="True" />

</Item>

  1. Use the numeric keyboard for the element Text-2.

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="Label" Value="Text 2" />

<Property Name="DataMember" Value="StringField2" />

<Property Name="Name" Value="StringField2" />

<Property Name="Tag" Value="KL:num" />

</Item>

DateTime

  1. Show only the date part in the element Date-1 and only the time part in the element Date-2 .

<Item Type="Resco.Controls.DetailView.ItemDate">

<Property Name="Label" Value="Date 1" />

<Property Name="DataMember" Value="DateField1" />

<Property Name="Name" Value="DateField1" />

<Property Name="NoneText" Value="" />

</Item>

<Item Type="Resco.Controls.DetailView.ItemTime">

<Property Name="Label" Value="Date 2" />

<Property Name="DataMember" Value="DateField2" />

<Property Name="Name" Value="DateField2" />

<Property Name="NoneText" Value="" />

</Item>

ComboBox

  1. In te element Flag-1, give the ability to choose between the values 0-Scheduled & 1-Ad hoc.

<Item Type="Resco.Controls.DetailView.ItemComboBox">

<Property Name="Label" Value="Flag 1" />

<Property Name="DataMember" Value="FlagField1" />

<Property Name="Name" Value="FlagField1" />

<Property Name="StringData" Value="0-Scheduled,1-Ad hoc" />

</Item>

ItemLink

MOB-ImplementationGuide EN-image57.PNG ItemLink type is used on an element in order to select a value from the data of a linked entity or to display relative information.

There are many alternative ways to implement an element of type ItemLink. The one we choose depends on the number of records or the information we need to display.

  • Select value-A limited number of records & information. A usual scenario for this case is the zoom tables where the number of records is relatively limited and information wise, displaying the code and description is usually enough. In this case the value selection list is displayed as a pop up window and the format to implement it:

#ValueMember#DisplayMember#DataMember#[POP] select ValueMember,DisplayMember,OtherMember…

e.g. “Category-1”

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="Label" Value="Category 1" />

<Property Name="DataMember" Value="fCategoryValue1GID" />

<Property Name="Name" Value="fCategoryValue1GID" />

<Property Name="Tag" Value="#GID#Code#ESTMTaskCategoryValue#

[POP] select v.GID,v.Code,v.Description

from ESTMTaskCategoryValue v

inner join ES00Params p on p.ParamID='CaseTaskTypeGID'

where v.DataField = 'ESTMTask.fCategoryValue1GID' and v.fTaskTypeGID=p.PValue" />

</Item>

  • Select value-Extended number of records or information. A usual scenario for this case is the master tables where the number of records is big or information wise, displaying just two elements is not enough. In this case we must use a form of type “Selection list”, display the selection list in a new screen and use the following format to implement it:

Command#ValueMember#DisplayMember#DataMember

e.g. “Address”

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="Label" Value="Address" />

<Property Name="DataMember" Value="fAddress" />

<Property Name="Name" Value="fAddress" />

<Property Name="Tag" Value="SiteInvForm#GID#Address#ESGOSites" />

</Item>

  • Display info-Not Enabled. Regardless of the number of records or information, in the case the user should not edit the elements in the data entry screen, the format to implement it would be:

External#ValueMember#DisplayMember#DataMember

e.g. “Person”

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="Label" Value="Person" />

<Property Name="DataMember" Value="fpersonname" />

<Property Name="Name" Value="fpersonname" />

<Property Name="Enabled" Value="false" />

<Property Name="Tag" Value="External#GID#Name#ESGOPerson" />

</Item>

Note that, alternatively the following definition can be used:

SQL#Select query

e.g. to display curent Site’s “Sting-1” info

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="Label" Value="Site's String Field1" />

<Property Name="DataMember" Value="fAddress" />

<Property Name="Name" Value="fAddress" />

<Property Name="Tag" Value="SQL#select Stringfield1 from ESGOSites where GID ='[fAddressGID]'" />

</Item>

Add element

Example/ Sample3DetailForm

Suppose we want to add in the default format for viewing MOB-ImplementationGuide EN-image52.pngView the Appointment elements, of the “Campaign” element (form: Sample3DetailForm/DetailView)

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="Label" Value="Campaign" />

<Property Name="DataMember" Value="fCampaignGID" />

<Property Name="Name" Value="fCampaignGID" />

<Property Name="Tag" Value="#GID#Code#ESTMCampaign#[POP]select GID,Code,Description from ESTMCampaign" />

</Item>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • Note that, since the field Campaign is not included in the select query or the update query of the command, we must edit the command and add it.

  • Also note that since the Campaign field is not included in the default from_data package, we have to extend the from_package, to send this information the user entered on the device to the backoffice.

Generic task (DocForm)

Example/ Competition

MOB-ImplementationGuide EN-image63.pngTo implement a data entry screen of generic task with header & lines (form now on DocForm) we have to define a command of type NewTaskCommand or EditTaskCommand for add new or edit respectively, a form of type DetailView for the header and a form of type AdvancedList for the lines.

The main difference between a named and a generic task is that in the case of a generic task the data of the screen is loaded dynamically so we don’t have to define a select & update query in the command. The two types of screen also differ in the declaration of the relative form. The points of differentiation are:

  • FormID - Optional. Must be set like GenericTaskForm/task type International ID (e.g. GenericTaskForm/es.compt for Competition task type)
  • TaskType - Mandatory. Must define the task type International ID (e.g. es.compt for Competition task type)
  • NoDetail – Optional. Must be set to False.

In order the command – form linking to be feasible, the form files must be placed in subfolders of GenericTaskForm folder named by the specific task type International ID. Note that the International ID is always defined in lower case characters.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

When the process of adding new generic task is called via the person or site/appointment environment, the command types to be used are NewTaskFromPersonCommand or NewTaskFromSiteCommand respectively.

Regarding the required settings for the header form, the same guidelines apply as those described in the above sections referring to the DetailView form. In this section the focus is on issues related to the configuration options of screen lines area.

Header

Suppose we want to extend the default header screen of Competition task type based on the following specifications (form: GenericTaskForm/es.compt/DetailView):

  1. Add an element about the task Description.

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="Label" Value="Subject" />

<Property Name="DataMember" Value="Subject" />

<Property Name="Name" Value="Subject" />

</Item>

  1. Add an element about the related “Campaign”.

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="Label" Value="Campaign" />

<Property Name="DataMember" Value="fCampaignGID" />

<Property Name="Name" Value="fCampaignGID" />

<Property Name="Tag" Value="#GID#Code#ESTMCampaign#[POP]select GID,Code,Description from ESTMCampaign" />

</Item>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • Regarding the definition of TextBox, DateTime, ComboBox & ItemLink elements, the same rules apply as those described above for the named task screen. (see section Data entry screens/ Named task (EditForm) Display elements)

  • Since the Campaign field is not included in the default from_data package, we have to extend the from_package, to send this information the user entered on the device to the backoffice.

Lines

Besides the settings of a “typical” form of type AdvancedList (e.g ListForm screen), the AdvancedList for the lines of DocForm screen, has some special extra characteristics which we will see next in this section.

Available columns

The available columns in the lines area are predefined by the ESMobile application. Specifically, in addition to the fields of the “TaskItem” table, we can also use these columns:

PersonName ItemMUCode LastCountedDate ExtStringField1
ItemCode SiteGID LastSoldDate ExtStringField2
ItemDescription TypeGID CountedQty1 ExtStringField3
InventoryItemCode* TypeInternationalID CountedQty2 ExtStringField4
InventoryItemDescription* GroupField CountedQty3 ExtStringField5
InventoryItemCodeDescription* GroupFieldSubTotal1 SoldQty1 ExtDateField1
CatalogueItemCode* GroupFieldSubTotal2 SoldQty2 ExtDateField2
CatalogueItemDescription* Category1Code SoldQty3 ExtDateField3
CatalogueItemCodeDescription* Category2Code ExtNumericField1 ExtDateField4
ItemFamilyCode Category1Description ExtNumericField2 ExtDateField5
ItemGroupCode Category2Description ExtNumericField3 Warning
ItemCategoryCode LastCountedQty ExtNumericField4 WarningMessage
ItemSubcategoryCode LastSoldQty ExtNumericField5 Error
ItemTaskCategoryValueGID LastSoldPrice ErrorMessage
* These columns get content only when the line refers to items or catalogue items

Suggested column value

We can define the default suggested values in each line column. To do this we have to “match” each column of the selection list with a column of the line. This mapping is done by stating in the selection list a column name in the format of Assign_CellSource line.

e.g. to have the competitor “Name” as suggested value in the field “String field 2 ” of the competition line:

<CompetitorLogoInvForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvFormCreatorCommand">

<Params>

<BaseSelect Type="System.String" Value="

select …

p.Name Assign_StringField2,

from ESMMCatalogueItem c

left join ESGOPerson p on (p.GID = pi.fPersonGID)" />

</Params>

</CompetitorLogoInvForm>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • When using one the line’s extra fields (fields starting with Ext) we have to declare in the file ESTMTaskItemExtDS, the concept we want it to acquire (see section Add-on development/ Database schema/ Extended DS or section Add-on development/ Business rules)

  • If the suggested value scenario we want to implement is not a simple value assignment from a field, we can use the tool Business rules, and set the assignment rule we want (see section Add-on development/ Business rules)

Edit column content

In the line’s AdvancedList, by configuring the property DesignName, we can edit the contents of a column in the line level. The setting required depends on the column type:

Type DesignName Comment
Text string
Date & Time datetime
Time time
Number numeric Alternatively we can leave the property DesignName blank and declare the property Selectable=True. In this case, focusing on this column will show the numeric keyboard.
Flag bool
Value list zoom=InvFormCreatorCommand Where InvFormCreatorCommand is the name of the command related to this selection list. To assign the selected value from the list to the appropriate column of the line, we must also change the selection list command and declare the required “mapping”.

MOB-ImplementationGuide EN-image64.PNGIf for example we want to format the competition line like the screenshot, the settings required are:

  • Change the form for the competition line (form: GenericTaskForm/es.compt/TaskItem/ AdvancedList) and depending on the column type, make the appropriate configuration to the property DesignName. (Exists: bool, Threat: zoom, Info: string)
  • Especially for the Threat column, since we want it to be a drop down selection list, we have to change the command of the InvList form (command: TaskItemThreatInvForm) and map the field “Code of the list to the line column “Threat code”.

column: Threat

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="CellSource" Value="fThreatCode" />

<Property Name="DesignName" Value="zoom=TaskItemThreatInvForm" />

</Cell>

command: TaskItemThreatInvForm

<TaskItemThreatInvForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvFormCreatorCommand">

<Params>

<BaseSelect Type="System.String" Value="

select Code,Description,AlternativeDescription,

Code Assign_fThreatCode

from ESTMZParticipantThreat" />

</Params>

</TaskItemThreatInvForm>

Column formatting

By defining the line’s AdvancedList properties, we have the following format capabilities by column type:

  • Number. Declaring the display format is performed via the property FormatSting. Some of the typical options are:
Definition Result Definition Result
{0:G} 16325,62 {0:P} or {0:0.00\%} 163,26 %
{0:C} 16.325,62 € {0:#,0} 16326
{0:N} or {0:#,#.00} 16.325,62
  • Date. Declaring the display format is performed via the property FormatSting. Some typical options are: {0:ddd d/M HH:mm}, {0: dd/MM/yyyy} , {0: HH:mm}. This property works in combination with the value set in property DesignName where the available options are: datetime, date & time.
  • Font. Formation refers to the size (property FontSize), the color (properties ForeColor, BackColor) and the style (property FontStyle) of the font. The supported options for color are: Blue, Brown, Cyan, Gray, Darkgray, Green, Lightgray, Magenta, Orange, Purple, Red, White and Yellow, while for style are: Bold and Italic.
  • Alignment. Declaring the alignment of the content of a column is performed via the property Alignment.
  • Grid. We can format the color and the border of the grid. Declaring the color is done with property BorderColor and the available options are: red, green, orange, blue, yellow, white, black and grey. Declaring the border format is done with property Border and the available options are: all, bottom, left, none, right and top.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

The ability of conditional formatting is also provided. The differentiation may be related to column or row display properties ForeColor, BorderColor, Visible etc.) thought the available condition types are: GreaterThan, LessThan, Equals, NotNull, Compound, IsOddIndex & AlwaysTrue (see Ideas & Solutions/ DocForm/ Column conditional formatting)

Image type column

In the AdvancedList for the lines and by using the element type MOB-ImplementationGuide EN-image65.PNGImageCell, we can show an image associated with line elements. To achieve this we must have in the folder ProductImages of the device, the image files named after the code of each line. This is supported in all task types regardless of whether the line refers to an item (e.g. count), catalogue item (e.g. competition) or an item’s group field (e.g. presence on the shelf). At the same time, with proper configuration of the line’s form, we can differentiate the default display parameters for the image. The differentiation is about the field associating line-image file as well as in the type & folder of the image file.

e.g. to show an image in competition line based on item code

<Cell Type="Resco.Controls.AdvancedList.ImageCell">

<Property Name="Bounds" Value="2,1,16,32" />

<Property Name="CellSource" Value="ItemCode"/>

<Property Name="DesignName" Value="ImageCell1"/>

</Cell>

e.g. to show an image in the competition line based on the competitor name

<Cell Type="Resco.Controls.AdvancedList.ImageCell">

<Property Name="Bounds" Value="2,1,16,32" />

<Property Name="CellSource" Value="PersonName" />

<Property Name="DesignName" Value="ImageCell1" />

<Property Name="ImageFolder" Value="CSImages/Logo"/>

<Property Name="ImageExtention" Value="png" />

</Cell>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

If we set True to the property Selectable of the column regarding the image, then by focusing on the image it is automatically displayed enlarged.

Group totals

Especially in tasks with lines referring to item, we can display an area for the group totals. To do this we must define, in the device parameter Task_MCH_GroupField, the field we want to group by and in the AdvancedList for the lines, declare the RowTemplate for the elements we want to display. We can also use the icon MOB-ImplementationGuide EN-image69.png Collapse group, to compact – collapse the analytical lines. The columns that we can show in the group totals are: Quantity & Quantity to order.

<RowTemplate>

MOB-ImplementationGuide EN-image70.PNG<Property Name="Name" Value="sectionheader" />

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="2,3,130,14" />

<Property Name="CellSource" Value="GroupField" />

</Cell>

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="165,3,22,14" />

<Property Name="CellSource" Value="Quantity" />

</Cell>

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="209,3,22,14" />

<Property Name="CellSource" Value="OrderQuantity" />

</Cell>

<Property Name="Height" Value="14" />

<Property Name="BackColor" Value="#237,243,254" />

</RowTemplate>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

In the RowTemplate regarding the area Group totals, we must set in the property Name, the text sectionheader.

General totals

We can also show, under the lines, an area for the general totals. To do this we must define in the AdvancedList regarding the lines, a new RowTemplate with the elements we want to show. The columns that we can show are either a field of the header ot a numerical column of the lines. The required setting, depending on the situation is:

  • Header’s field. Declaration of the field name in property CellSource.
  • Total of a line column. Declaration of the form Total_ColumnName in property Name.
  • Total lines. Declaration of the text LineTotal in property Name.

e.g. for the screen of task type competition.MOB-ImplementationGuide EN-image72.PNG

<RowTemplate>

<Property Name="Name" Value="Footer" />

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="3,7,50,16" />

<Property Name="CellSource" Value="Subject" />

<Property Name="Name" Value="" />

</Cell>

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="135,7,10,16" />

<Property Name="CellSource" Value="" />

<Property Name="Name" Value="LineTotal" />

</Cell>

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="202,7,36,16" />

<Property Name="CellSource" Value="" />

<Property Name="Name" Value="Total_Quantity" />

</Cell>

<Property Name="Height" Value="16" />

<Property Name="BackColor" Value="ffcccccc" />

</RowTemplate>

Functionality

The functionality of the TaskForm screen is declared in the file Actions.xml (e.g. for a task of type competition in the file GenericTaskForm/es.compt/TaskItem/Actions). The separation of the actions in the individual sections of the file depends on the action type.

Actions Toolbar

In this section, the actions of the section Actions of the file Actions.xml are displayed. Each of these actions is an individual button in the action toolbar. In this section we usually put the actions regarding the line management.

MOB-ImplementationGuide EN-image74.pnge.g. for the screen of a task of type competition

MOB-ImplementationGuide EN-image72.PNG

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

Buttons with a null value in property Name are non-functional and used only to provide some distance between the functional buttons.

Other buttons

The TaskForm screen, besides the actions tollbar, also has the following default functionality buttons.

Button Comments
MOB-ImplementationGuide EN-image33.png Actions The actions declared in the section ToolbarActions of the file Actions.xml are displayed here. In this section we usually place functions regarding the whole entity (e.g. send E-mail).
MOB-ImplementationGuide EN-image32.png Online The actions declared in the section ToolbarOnLineActions of the file Actions.xml are displayed here. In this section we usually place functions that require an online connection to the server (e.g. online HTML reports)
MOB-ImplementationGuide EN-image81.png Save The save options declared in the property SaveMenu of the command associated with this screen (e.g. command EditTask). The typical options are: 1-Save, 2-Save and at the same time change the task status to “Completed” and 3-Save and at the same time change the task status to “Canceled”.

Extra tabs

The actions declared in section Tabs of the Actions.xml file, are displayed as extra tab pages. In this section we place actions that display person related additional info. Extra tabs are placed after the “Contents” tab page following the order defined in the Actions.xml file.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

  • In case the additional info is exclusively based on task’s current person, the required configuration is to feed [CURRENT] variable with the content of “Person” entity's GID. In case the additional info is based on other fields, the definition of the detailed execution conditions is a prerequisite (see Ideas & Solutions/ DocForm/ Extra tabs)

  • Based on product configuration, tab “Contents” is the task screen default page. Via the DefaultTab property of Actions.xml file, the ability to change the default page is provided.

  • The functionality of displaying extra tab pages is feasible only when the property Tag of lines AdvancedList file is empty.

Filter lines

To implement alternative filter criteria for the lines we must declare a command of type SearchPanelCreatorCommand named in the form of SP_Task type international code (e.g. command SP_es.compt fot the competition line filter).

e.g. to filter the competition lines based on catalogue item code or based on competitor

<SP_es.compt Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.SearchPanelCreatorCommand">

<Params>

<SearchPanelFilter Type="System.Xml.XmlElement" Value="">

<element type="FieldChooser" minimumInput="" id="1">

<column name="*ItemCode*" title="Item code" />

<column name="*ItemDescription*" title="Item description" />

</element>

<element type="DropDown" id="2">

<column>fPersonGID</column>

<query>select GID, Name from ESGOPerson where Competitor = 1</query>

<default>All</default>

<title>Competitor</title>

</element>

</SearchPanelFilter>

</Params>

</SP_es.compt>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

For the required settings for the alternative filter criteria of the lines, the same rules apply as described above for the ListForm screen (see section Display screens/ List (ListForm)/ Command/ Filter records).

Sort lines

The definition of alternative criteria for sorting the lines is made in the section SortBy in the file Actions.xml. We can show the available sorting criteria using the button MOB-ImplementationGuide EN-image12.png“Sort”.

e.g. to sort the competition lines based on item description or competitor

<ActionDefinition>

<Actions>...

<SortBy Type="gr.entersoft.esmobile.SortBy">

<Definition>

<SortByField Caption="Item description" ESCaptionID = "" Expression="GroupField, ItemDescription"

Default="false" />

<SortByField Caption="Competitor" ESCaptionID = "" Expression="GroupField, PersonName"

Default="false" />

</Definition>

</SortBy>

</ActionDefinition>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • In case group totals feature is activated, we must declare field GroupField as the first grouping factor.

  • The sort action interprets all fields as text fields. In order sorting by a numeric field to be accurate, the “conversion” of number to text is a prerequisite (see section Ideas & Solutions/ DocForm/ Sort lines).

Generic task (EditForm)

The basic guidelines for implementing a data entry screen of generic task with no lines are the same to those described above for the generic task with header & lines. The two types of screen only differ in the declaration of the relative form. Specifically, the required configuration is:

  • FormID - Mandatory. Must be set like GenericTaskForm/task type International ID (e.g. GenericTaskForm/es.tsk for Generic task task type)
  • TaskType - Mandatory. Must define the task type International ID (e.g. es.tsk for Generic task task type)
  • NoDetail – Mandatory. Must be set to True.

Document (DocForm)

Example/Order

MOB-ImplementationGuide EN-image82.pngThe document (e.g. Offer, Order, Collection) is an entity consisting of header & lines. To implement a screen for document data entry we must define a command of type NewDocumentCreatorCommand or EditDocumentCreatorCommand for entry for or view respectively, a form of type DetailView for the header and a form of type AdvancedList for the lines.

Data in a document data entry screen are loaded automatically so there is no need to declare a select & update query in the command. The connection between command-form is also made dynamically via a parameter we define when calling the command, regarding the document type (e.g. Doc#NewDocumentfromApp#1 for order data entry). A prerequisite for the dynamic command-form association is to place the form’s files in a subfolder in the area GenericDocForm and name them with the document type.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

When the process of adding new document is called via the site or appointment environment, the command types to be used are NewDocumentFromSiteCommand or NewDocumentFromAppCommand respectively.

Regarding the required settings for the header form, the same guidelines apply as those described in the above sections referring to the DetailView form. In this section the focus is on issues related to the configuration options of screen lines area.

Header

Suppose we want to extend the header data entry screen of a document of type Order based on the following specifications (form: GenericDocForm/1/DetailView)

  1. Add an element for Text-1

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="Label" Value="Sting field 1" />

<Property Name="DataMember" Value="StringField1" />

<Property Name="Name" Value="StringField1" />

</Item>

  1. Add an element for Table-1

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="Label" Value="Table 1" />

<Property Name="DataMember" Value="fADTableField1Code" />

<Property Name="Name" Value="fADTableField1Code" />

<Property Name="Tag" Value="#Code#Description#ESFIZDocumentHeadersTable#[POP]

select Code, Description, Code

from ESFIZDocumentHeadersTable where TableNumber = 1" />

</Item>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

Regarding the definition of TextBox, DateTime, ComboBox & ItemLink elements, the same rules apply as those described above for the named task screen (see section Data entry screens/ Named task (EditForm)/ Display elements)

Lines

Besides the editing capabilities of a “typical” form of type AdvancedList (e.g. form type “ListForm”), the document’s lines data entry screen AdvancedList (from now on DocForm) has some extra characteristics which we will present in this section.

Available columns

The columns available to use in the lines section are predefined by the ESMobile application. Specifically, besides the fields of the table “ESFISalesDocLineItem”, the following columns are also available:

ItemCode ItemWeightQuantity ExtStringField1 ExtDateField1
ItemDescription ItemWeightMURelation ExtStringField2 ExtDateField2
ItemFamilyCode ItemWeightMUDecimals ExtStringField3 ExtDateField3
ItemGroupCode ItemWeightRelationWithMMU ExtStringField4 ExtDateField4
ItemCategoryCode ItemWeightMUCode ExtStringField5 ExtDateField5
ItemSubcategoryCode ItemVolumeQuantity ExtNumericField1 Warning
ItemMUCode ItemVolumeMURelation ExtNumericField2 WarningMessage
GroupField ItemVolumeMUDecimals ExtNumericField3 Error
ItemVolumeRelationWithMMU ExtNumericField4 ErrorMessage
ItemVolumeMUCode ExtNumericField5

Default column value

We can define the default value for each of the line’s columns. To do this we have to “match” the selection list column to a line column. This mapping is done by declaring in the selection list the name of the column using the form Assign_CellSource of line.

e.g. to propose the “Manufacturer” as default value in the order line field “Comment”

<Special1InvForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvFormCreatorCommand">

<Params>

<BaseSelect Type="System.String" Value="

select …

Manufacturer Assign_Reasoning

From ESFIItem i " />

</Params>

</Special1InvForm>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • When using one of the line’s extra fields (fields starting with Ext) we have to declare, in the file ESFISalesDocLineItemExtDS, the concept we want it to acquire (see section Add-on development/ Database schema/ Extended DS or section Add-on development/ Business rules).

  • If the suggested value scenario we want to implement is not a simple value assignment from a field, we can use the tool Business rules, and set the assignment rule we want (see section Add-on development/ Business rules)

Editing column content

In the AdvancedList of the lines by configuring the property DesignName, we can edit the content of a line’s column. The settings required depend on the column type:

Type DesignName Comments
Text string
Date & time datetime
Time time
Number numeric Alternatively, we can leave the property DesignName null and define the property Selectable=True. In this case, by focusing on the column we display the numeric keyboard.
Flag bool
Value list zoom=InvFormCreatorCommand Where InvFormCreatorCommand is the name of the command related to this selection list. To assign the selected value from the list to the appropriate column of the line, we must also change the selection list command and declare the required “mapping”.

If for example we want to format the order line like the screenshot, the settings required areMOB-ImplementationGuide EN-image83.PNG:

  • Change the form assosiated to the order line (form: GenericDocForm/1/AdvancedList) depending on the column type, and define the property DesignName.(Reasoning: string, Shipping notes: zoom, In VAT: bool)
  • Especially for the column Shipping notes, since we want it to function as a “Value selection list”, we also have to change the command of the corresponding InvList form (command: DocumentHeadersTable2) to map the field “Code” of the list to the column “Table-2” of the line.

column: Table-2

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="CellSource" Value="fADTableField2Code" />

<Property Name="DesignName" Value="zoom=DocumentHeadersTable2#Code#fADTableField2Code" />

</Cell>

command: DocumentHeadersTable2

<DocumentHeadersTable2 Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvFormCreatorCommand">

<Params>

<BaseSelect Type="System.String" Value="

select Code,Description,AlternativeDescription,

Code Assign_fADTableField2Code

from ESFIZDocumentHeadersTable" />

</Params>

</DocumentHeadersTable2>

Selected item line buttons

In the RowTemplate for the selected record of the AdvancedList of the lines and by using the element of type ButtonCell, we can call functions regarding the line management. In the property ImageDefault we set the icon that is displayed for this action, and in the property Name we declare the command that will be executed.

Button Comments
MOB-ImplementationGuide EN-image84.png Delete line (command: DeleteButton)
MOB-ImplementationGuide EN-image85.png Switch to a screen that shows, via an online connection to the server, the current item balance (connamd: BalanceButton)
MOB-ImplementationGuide EN-image43.png Switch to a screen that displays the full details of the line (command: ISUDButton)
MOB-ImplementationGuide EN-image86.png & MOB-ImplementationGuide EN-image87.png Increase & Decrease the line quantity (commands: PlusButton & MinusButton)
MOB-ImplementationGuide EN-image88.png Assign 100% discount. The declaration of the line discount field the assignment will be made, is done in the device parameter Doc_GiftDiscount_Field. (command: GiftButton)
MOB-ImplementationGuide EN-image89.png Switch to a screen for entering quantity per size-color (command: AnalysisButton)

Column formatting

By defining the line AdvancedList properties, we have the following format capabilities by column type:

  • Number. Declaring the display format is performed via the property FormatSting. Some of the typical options are:
Definition Result Definition Result
{0:G} 16325,62 {0:P} or {0:0.00\%} 163,26 %
{0:C} 16.325,62 € {0:#,0} 16326
{0:N} or {0:#,#.00} 16.325,62
  • Date. Declaring the display format is performed via the property FormatSting. Some typical options are: {0:ddd d/M HH:mm}, {0: dd/MM/yyyy} , {0: HH:mm}. This property works in combination with the value set in property DesignName where the available options are: datetime, date & time.
  • Font. Formation refers to the size (property FontSize), the color (properties ForeColor, BackColor) and the style (property FontStyle) of the font. The supported options for color are: Blue, Brown, Cyan, Gray, Darkgray, Green, Lightgray, Magenta, Orange, Purple, Red, White and Yellow, while for style are: Bold and Italic.
  • Alignment. Declaring the alignment of the content of a column is performed via the property Alignment.
  • Grid. We can format the color and the border of the grid. Declaring the color is done with property BorderColor and the available options are: red, green, orange, blue, yellow, white, black and grey. Declaring the border format is done with property Border and the available options are: all, bottom, left, none, right and top.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

The ability of conditional formatting is also provided. The differentiation may be related to column or row display properties ForeColor, FontStyle, Visible etc.) thought the available condition types are: GreaterThan, LessThan, Equals, NotNull, Compound, IsOddIndex & AlwaysTrue (see Ideas & Solutions/ DocForm/ Column conditional formatting)

MOB-ImplementationGuide EN-image90.PNGImage type column

In the AdvancedList for the lines and by using the element type ImageCell, we can show an image associated with line elements. To achieve this we must have in the folder ProductImages of the device, the image files named after the code of each line. At the same time, with proper configuration of the lines’ form, we can differentiate the default display parameters for the image. The differentiation is about the field associating line-image file as well as in the type & folder of the image file.

e.g. to show an image in the order line based on the item code

<Cell Type="Resco.Controls.AdvancedList.ImageCell">

<Property Name="Bounds" Value="2,1,16,32" />

<Property Name="CellSource" Value="ItemCode"/>

<Property Name="DesignName" Value="ImageCell1"/>

</Cell>

e.g. to show an image in the order line based on the item category code

<Cell Type="Resco.Controls.AdvancedList.ImageCell">

<Property Name="Bounds" Value="2,1,16,32" />

<Property Name="CellSource" Value="ItemCategoryCode" />

<Property Name="DesignName" Value="ImageCell1" />

<Property Name="ImageFolder" Value="CSImages/Logo"/>

<Property Name="ImageExtention" Value="jpg" />

</Cell>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

If we set True to the property Selectable of the column regarding the image, then by focusing on the image it is automatically displayed enlarged.

Item Board

In the AdvancedList of the lines with proper configuration of the column associated with the image we can switch to the Board screen of the item. To enable this feature, the following settings are required:

  • Create a command of type BoardCreatorCommand (e.g. command Sample1Board). In the property FormID we declare the file that describes how the screen is displayed. This file should be saved in the folder CSConfig/Boards. Note here that, if the property BaseSelect is null, only the elements of the table ESFIItem are available.

<Sample1Board Assembly="Entersoft.Mobile" Type="Entersoft.Mobile.BoardCreatorCommand">

<Params>

<FormID Type="System.String" Value="menu_board" />

<Title Type="System.String" Value="BoardItem" />

<BaseSelect Type="System.String" Value="

Select * from ESFIItem i

Left Join ES00Comment c on (i.GID = c.fGID)" />

<Filter Type="System.String" Value="GID = '[CURRENT]'" />

</Params>

</Sample1Board>

  • Declare the above command in the property BoardCommand in the column associated with the image.

e.g. to show the item board from the order line

<RowTemplate>

<Property Name="Name" Value="RowTemplate" />

<Cell Type="Resco.Controls.AdvancedList.ImageCell">

<Property Name="Bounds" Value="2,1,16,40" />

<Property Name="CellSource" Value="ItemCode" />

<Property Name="DesignName" Value="ImageCell1" />

<Property Name="BoardCommand" Value="SampleBoard" />

</Cell>

</RowTemplate>

MOB-ImplementationGuide EN-image94.PNG

Group totals

We can display an area for the group totals. To do this we must define in the device parameter Doc_GroupField, the field we want to use to group by and in the AdvancedList for the lines, declare the RowTemplate for the elements we want to display. We can also use the icon MOB-ImplementationGuide EN-image69.pngCollapse group, to compact – collapse the analytical lines. The following table lists the columns that are available to display. To reference the column we want, we must declare this text in the property CellSource of the element

Field CellSource Field CellSource
Line total LineSubTotal Average discount % DiscTotalPercSubTotal
Quantity QtySubTotal Weight WeightSubTotal
Net value NetSubTotal Volume VolumeSubTotal
VAT value VatSubTotal
Discount total value DicountSubTotal
Total value TotalSubTotal

MOB-ImplementationGuide EN-image98.PNGe.g. for the order screen

<RowTemplate>

<Property Name="Name" Value="sectionheader" />

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="5,2,40,14" />

<Property Name="CellSource" Value="GroupField" />

</Cell>

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="130,2,10,14" />

<Property Name="CellSource" Value="QtySubTotal" />

</Cell>

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="195,2,20,14" />

<Property Name="CellSource" Value="DicountSubTotal" />

</Cell>

<Property Name="Height" Value="12" />

<Property Name="BackColor" Value="#237,243,254" />

</RowTemplate>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

The RowTemplate for the group Totals is mandatory to have in the property Name, the text sectionheader.

General totals

We can show, under the lines, an area for the general totals. To do this we must define in the AdvancedList associated to the lines, a new RowTemplate with the elements we want to show. To reference the column we want, we must declare the appropriate text in the property Name. The following table lists the available fields and the texts corresponding to each one.

Field Name Field Name
Line total LineTotal Total discount value DiscTotal
Quantity QtyTotal Avetage discount % DiscTotalPerc
Gifts quantity GiftTotal Appointment turnover budget Budget
Net value NetTotal Minimum document value MinValue
VAT value VatTotal Avetage collection time TradeAccountAvgCollectionTime
Total value Total

At the same time, available to display in section general totals are all header’s & line’s numeric fields. The required setting, depending on the situation is:

  • Header’s field. Declaration of the field name in property CellSource.
  • Total of a line column. Declaration of the form Total_ColumnName in property Name.

Functionality

The DocForm functionality is declared in the file Actions.xml (e.g. for a document of type order, in the file GenericDocForm/1/Actions). The separation of the actions in the individual sections of the file depends on the action type.

Actions Toolbar

In this section, the actions of the section Actions of the file Actions.xml are displayed. Each of these actions is an individual button in the action toolbar. In this section we usually put the actions regarding the line entry.

MOB-ImplementationGuide EN-image98.PNGe.g. for the order screen

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • We can extend the toolbar actions with custom actions called on the selected line that result in displaying a data entry screen or an online report screen. (see section Ideas & Solutions/ DocForm/ Actions on selected line or section Informative screens/ Online report (HTMLReport)/ On document line)

  • Buttons with a null value in property Name are non-functional and used only to provide some distance between the functional buttons.

Other buttons

The DocForm screen, besides the actions tollbar, also has the following default functionality buttons.

Button Comments
MOB-ImplementationGuide EN-image33.png Actions The actions declared in the section ToolbarActions of the file Actions.xml are displayed here. In this section we usually place functions regarding the whole entity (e.g. send E-mail).
MOB-ImplementationGuide EN-image32.png Online The actions declared in the section ToolbarOnLineActions of the file Actions.xml are displayed here. In this section we usually place functions that require an online connection to the server (e.g. online HTML reports)
MOB-ImplementationGuide EN-image81.png Save The button for instant save of the document

e.g. for the order screen

<ActionDefinition>

<Actions>...

<Tabs>...

<ToolbarActions>

<DocToolbarAction

Caption="Discount mass update %"

Command="OrderDiscountButton" ESCaptionID=""

/>

<DocToolbarAction

Caption="Save to server"

Command="PushSaveButton" ESCaptionID=""

/>

<DocToolbarAction

MOB-ImplementationGuide EN-image98.PNGCaption="Apply commercial policy"

Command="ApplyCommercialPolicy" ESCaptionID=""

/>

</ToolbarActions>

<ToolbarOnLineActions>

<DocToolbarAction

Caption="Customer ledger"

Command="HtmlCommand_CustomerLedger"

Current="fTradeAccountGID" ESCaptionID=""

/>

<DocToolbarAction

Caption="Open notes"

Command="HtmlCommand_Customer_Open_Notes"

Current="fTradeAccountGID" ESCaptionID=""

/>

<DocToolbarAction

Caption="Age analysis"

Command="InfoCommand_Customer_Balance_Age_Analysis"

Current="fTradeAccountGID" ESCaptionID=""

/>

</ToolbarOnLineActions>

<SortBy>...

</ActionDefinition>

Extra tabs

The actions declared in section Tabs of the Actions.xml file, are displayed as extra tab pages. In this section we place actions that display customer related additional info. Extra tabs are placed after the “Contents” tab page following the order defined in the Actions.xml file.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

  • In case the additional info is exclusively based on document’s current customer, the required configuration is to feed [CURRENT] variable with the content of “Trade Account” entity's GID. In case the additional info is based on other fields, the definition of the detailed execution conditions is a prerequisite (see Ideas & Solutions/ DocForm/ Extra tabs)

  • Based on product configuration, tab “Contents” is the task screen default page. Via the DefaultTab property of Actions.xml file, the ability to change the default page is provided.

Filter lines

To implement alternative filter criteria for the lines we must declare a command of type SearchPanelCreatorCommand named in the form of SP_doc_document type number (e.g. command SP_doc_1 for the order document line filter)

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

For the required settings for the alternative filter criteria of the lines, the same rules apply as described above for the ListForm screen (see section Display screens/List (ListForm)/ Command/ Filter records).

Sort lines

The definition of alternative criteria for sorting the lines is made in the section SortBy in the file Actions.xml. We can show the available sorting criteria using the button MOB-ImplementationGuide EN-image12.png“Sort”.

e.g. to sort the order lines based on item code or discount-3

<ActionDefinition>

<SortBy Type="gr.entersoft.esmobile.SortBy">

<Definition>

<SortByField Caption="Item code" ESCaptionID = "" Expression="GroupField, ItemCode"

Default="false" />

<SortByField Caption="Disc 3" ESCaptionID = "" Expression="GroupField, Disc3 desc"

Default="false" />

</Definition>

</SortBy>

</ActionDefinition>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • In case group totals feature is activated, we must declare field GroupField as the first grouping factor.

  • The sort action interprets all fields as text fields. In order sorting by a numeric field to be accurate, the “conversion” of number to text is a prerequisite (see section Ideas & Solutions/ DocForm/ Sort lines).

Informative screens

Information screens are used to show economic & financial information for clients or items of the device. The best way to implement an information form depends on whether the information we want to display is coming from the local database or by connecting online to the server.

MOB-ImplementationGuide EN-image109.PNGLocal report (ReportForm)

Example/ Sample1ReportForm

A form of type “ReportForm” is used to display records of the local database with the form of a report. To implement it we need a command of type ESDataGridCommand and a report form of type ReportDefinition. The report’s data and the command-report association are specified in the properties of the command, while the layout is specified in the elements of the report.

e.g. to show for the selected item the “local” stock availability with analysis and by Color/Size

<Sample1ReportForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMerchandize.ESDataGridCommand">

<Params>

<Title Type="System.String" Value="Item stock" />

<FormID Type="System.String" Value="Sample1ReportForm" />

<SQL Type="System.String" Value="

Select

case when ib.fItemGID is null then '-' else ib.fColorCode end fColorCode,

case when ib.fItemGID is null then '-' else ib.fSizeCode end fSizeCode,

case when ib.fItemGID is null then i.CurrentBalance else ib.CompanyBalance end CompanyBalance,

case when ib.fItemGID is null then i.CurrentBalanceBranch else ib.BranchBalance end BranchBalance,

case when ib.fItemGID is null then i.PurchaseOrders else ib.PurchaseOrder end PurchaseOrder

From ESFIItem i

Left Join ESMMItemBalance ib on ib.fItemGID=i.GID

Where i.GID = '[CURRENT]'

Order by fColorCode, fSizeCode" />

<ScalesPageToFit Type="System.Boolean" Value="true" />

</Params>

</Sample1ReportForm>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

  • The declaration of a specific alias for all columns defined in the command is required. It is also important that the declared alias do not contain the underscore character.

  • The report form has two predefined sections. The ColumnSections section defines the columns to be displayed while the CssStyle section defines the formatting of the displayed elements.

Report filter

Sample/ OpenNotesListForm

The report’s alternate filters are defined via property SearchPanelFilter. Concerning the required settings of the various filter criteria, the same applies as described for ListForm screens (see section Display screens/List (ListForm)/ Command/ Filter records). Special attention should be paid so the declaration of properties: Where, OrderBy & GroupBy to be in separated properties and not in the body of the main query.

MOB-ImplementationGuide EN-image110.png Suppose for example that we want to expand the report Open notes (command: OpenNotesListForm) with the ability to filter the records based on note’s End date field.
  1. Rename property SQL to BaseSelect.
  2. Move contents of where close to property Filter
  3. Move the order by filed to property OrderBy
  4. Add to property SearchPanelFilter the specific filtering criterion

<OpenNotesListForm Assembly="Entersoft.Mobile.ESMerchandize"

Type="Entersoft.Mobile.ESMerchandize.ESDataGridCommand">

<Params>

<Title Type="System.String" Value="Open cheques" />

<FormID Type="System.String" Value="OpenNotesListForm" />

<Filter Type="System.String" Value="

n.CurrencyValue &gt; n.ClosedValue and n.IsOpen = 1 and p.GID = '[CURRENT]'" />

<BaseSelect Type="System.String" Value="

select

n.ReferenceNumber NumberBank, n.DueDate DueDate, ns.Description State,

from ESFINote n

inner join ESFITradeAccount ta on (ta.GID = n.fTradeAccountGID)

inner join ESGOPerson p on (p.GID = ta.fPersonGID)

inner join ESFIZNoteState ns on (ns.Code = n.fNoteStateCode)

left join ESGOBank b on (b.GID = n.fPersonBankGID)

" />

<ScalesPageToFit Type="System.Boolean" Value="true" />

<OrderBy Type="System.String" Value="DueDate" />

<SearchPanelFilter Type="System.Xml.XmlElement" Value="">

<element type="Datefield" id="1">

<column>n.DueDate</column>

<title>Period</title>

</element>

</SearchPanelFilter>

</Params>

</OpenNotesListForm>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

The filtering criteria are applied only on current level’s data. In order to be also applied on all drill-down levels, their definition in each level is a prerequisite.

Online form (InfoForm)

Example/ InfoCommand_Item

A screen of type “InfoForm” is used to show, via an online connection to the server, information about a specified record. To implement it we have to declare an EBS scroller and a command of type InfoCommand. The association of the command – EBS scroller and the parameters for executing the scroller are specified in the properties of the command.

e.g. to show by connecting online for the selected item, the total stock availability

MOB-ImplementationGuide EN-image111.PNG

<InfoCommand_Item Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InfoCommand">

<Params>

<Title Type="System.String" Value="Current balance"/>

<Current Type="System.String" Value="" />

<InfoType Type="System.String" Value="Item" />

<ParamName1 Type="System.String" Value="ISUDGID" />

<ParamName2 Type="System.String" Value="" />

<ParamValue2 Type="System.String" Value="" />

<Scroller Type="System.String"

Value="ESTMPDAMap\ESTMPDAMapItem" />

</Params>

</InfoCommand_Item>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • The EBS scroller should have a parameter for the GID of the entity from which the form of type InfoForm is called. The name of this parameter on the scroller query should be ISUDGID.

  • The elements displayed on the screen as well as the captions – order of appearance depend exclusively on the EBS scroller layout.

Online report (HTMLReport)

A screen of type “HTMLReport” is used to view records, via an online connection to the server, in the form of a report. To implement it we have to declare an EBS scroller and a command of type HtmlScrollerCommand. The association of command – EBS scroller and the scroller execution parameters are specified in the properties of the command.

On entity

Example/ Html_ESItemBalanceStock

MOB-ImplementationGuide EN-image112.PNGIf the HTMLReport is called from an environment that automatically assigns the parameters to the EBS scroller, these parameters are declared as appearing Never to the scroller parameters panel. The report is displayed having already applied on it’s data the required filters.

e.g. to show by connecting online, for the selected item, the total stock availability

<Html_ESItemBalanceStock Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.HtmlScrollerCommand">

<Params>

<Title Type="System.String" Value="Stock availability" />

<AutoExecute Type="System.Boolean" Value="true" />

<ParamName Type="System.String" Value="" />

<ParamValue2 Type="System.String" Value="" />

<ScrollerGroup Type="System.String" Value="ESMobileQueries" />

<ScrollerID Type="System.String" Value="ESItemBalanceStock" />

</Params>

</Html_ESItemBalanceStock>

On document line

MOB-ImplementationGuide EN-image113.PNGExample/ Html_ESSalesPerItem

Suppose for example that we want to add to the action toolbar of the Order line an action to show the MOB-ImplementationGuide EN-image43.png Item sales history. To do this we must change the file Actions.xml of the document form and in the section Actions, add the following

<Actions>

<ActionButton ImagePath="Images/LineMore.png" Name="Command"

Command="Html_ESSalesPerItem" Width="30" Height="30">

<ParamList>

<Param DataSource="ESFISalesDocLineItem.fItemGID" Name="ISUDGID" Value=""/>

</ParamList>

</ActionButton>

</Actions>

With inquired parameters

Example/ Sample2ReportForm

Suppose for example that we want to add to the main menu of the application an option to show, via an online connection to the server, the current stock availability per warehouse. Let’s say we want to give the user the option to execute this scroller for a specific item or a specific warehouse. The required settings are:

  • Add an EBS scroller (Sample2ReportForm) to show the current stock availability with the parameters: item code (ItemCode) and warehouse code (WHCode).
  • Add a command to call this specific EBS scroller (command: Sample2ReportForm). As command parameters we declare the fields: ItemCode & WHCode.

MOB-ImplementationGuide EN-image114.PNG

<Sample2ReportForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.HtmlScrollerCommand">

<Params>

<Title Type="System.String" Value="Stock balance" />

<AutoExecute Type="System.Boolean" Value="true" />

<ScrollerGroup Type="System.String" Value="ESTMPDASales" />

<ScrollerID Type="System.String" Value="Sample2ReportForm" />

<ParamList Type="System.Collections.Hashtable">

<ItemCode Type="System.String" Value=""/>

<WHCode Type="System.String" Value=""/>

</ParamList>

</Params>

</Sample2ReportForm>

  • Add an “EditForm” screen with a form of type DetailView (Sample2ReportForm_Params) to show the execution parameters of the EBS scroller. In the command’s property IsParamsPanel we set the value True

<Sample2ReportForm_Params Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.EditFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="Sample2ReportForm_Params" />

<Title Type="System.String" Value="Stock balance criteria" />

<BaseSelect Type="System.String" Value="" />

<RequiredFields Type="System.String" Value="" />

<IsParamsPanel Type="System.Boolean" Value="true" />

<Editable Type="System.Boolean" Value="true" />

<RelatedFields Type="System.String" Value="" />

</Params>

</Sample2ReportForm_Params>

In the form of this screen, besides the elements for the EBS scroller parameters, we also place an element of type ItemLink with the value Button in the property Name and the property Tag assigned to the command that will call the EBS scroller (form: Sample2ReportForm)

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="Label" Value="Item" />

<Property Name="DataMember" Value="ItemCode" />

<Property Name="Name" Value="ItemCode" />

</Item>

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="Label" Value="WH" />

<Property Name="DataMember" Value="WHCode" />

<Property Name="Name" Value="WHCode" />

</Item>

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="ButtonLike" Value="True" />

<Property Name="Editable" Value="True" />

<Property Name="Label" Value="OK" />

<Property Name="Tag" Value="Sample2ReportForm#ItemCode@ItemCode#WHCode@WHCode" />

<Property Name="DataMember" Value="OK" />

<Property Name="Name" Value="Button" />

</Item>

  • Finally, in order to activate the calling of the parameters screen we make the appropriate configuration to the main menu of the application.

Special screens

Main menu

The development of the ESMobile application Main Menu is done using the special file Home.xml of the form HomeForm. Thought the components of the main menu, we can configure the structure and the contents so that it responds to the user navigation needs.

  • Options group. Is used to place a number of similar options under a common title that has no other functionality. The group title is declared in the property title.
  • “Sub-menu” option type. Is used to place a number of similar options or type command, under a common title. By focusing on this type, the available commands appear under it. The title & the icon of the sub-menu are declared in the properties title & icon respectively, while in the section submenu we set the individual options of type command.

e.g. to place new person entries under the menu option “New”

<item type="listform" id="">

<title>New</title>

<icon>Images/ios7//AddNewPerson.png</icon>

<command></command>

<submenu>

<item type="listform" id="">

<title>Customer</title>

<icon>Images/ios7//AddNewPerson.png</icon>

<command>CustomerNewForm</command>

</item>

<item type="listform" id="">

<title>Contact</title>

<icon>Images/ios7//AddNewPerson.png</icon>

<command>ContactNewForm</command>

</item>

<item type="listform" id="">

<title>Candidate customer</title>

<icon>Images/ios7//AddNewPerson.png</icon>

<command>CandidateNewForm</command>

</item>

</submenu>

</item>

  • “Command” option type. By focusing on a command option type, we activate the call of the form this command is associated with. The title & the icon for this option are declared in the properties title & icon, while the command is declared in the property command.

e.g. to call the form regarding the customer list

<item type="listform" id="24583B59-DD86-4A56-AD67-CC0EB5AD5A4D">

<title>Customers</title>

<icon>Images/ios7//customers.png</icon>

<command>CustomerListForm</command>

<PopToRoot>true</PopToRoot>

</item>

Calendar

On entering the ESMobile application, our workspace shows the Calendar screen that displays the data we want, in the form of label or list or pin on the map. To implement the calendar screen, besides the command & the form, some additional configuration is required in a special file that is stored in the area Settings of the form (file: CalendarTaskSettings). This section refers to customization capabilities regarding the various elements of the calendar screen.

Tabs

We can define the calendar tab we want to use as default with the property DefaultTab in the Settings file. The available values are: 0-Day, 1-Week, 2-Month & 3-List. Furthermore, via the properties DisableDayTab, DisableWeekTab, DisableMonthTab & DisableListTab or DisableMap the ability to hide-unhide the tabs or the map is provided. For the required form & functionality of the “list” form, the same rules apply as those described above for the form of type “ListForm”. Note here, that for a calendar form it is required to also declare a Dashboard form (file: ExtraLayoutParams).

MOB-ImplementationGuide EN-image118.PNGLabel & Pin

The definition of information that we want to display in a label & pin is made by configuring the property BalloonTitle in the Settings file. Note here that it is required that the information we want to display is included in the query of the command associated with this specific screen.

We can also format the tasks that are displayed in the calendar based on specific conditions. We can format the color of the background and the font. The available color options are: black, blue, gray, green, orange, red, white and yellow. To do this, in the command associated with the Calendar form, we must include a column with name BackgroundColor and TextColor respectively.

e.g. to change the font for scheduled tasks to orange and for ad hoc tasks to blue

<TaskListForm Assembly="Entersoft.Mobile.ESSalesForce"

Type="Entersoft.Mobile.ESSalesForce.FormCreatorCommand">

<Params>

<BaseSelect Type="System.String" Value="select task.GID TaskGID, task.Code,…

case when task.UserID=r.UserID then 'blue' else 'orange' end TextColor

From ESTMTask task

Left Join ESTMResource r on task.UserID=r.UserID …" />

</Params>

</TaskListForm>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

Based on product configuration the background colors grey & red are used for labeling completed & canceled tasks respectively.

Button New/ Task type

In the Calendar form, we have the option to enter a new record. This option is available for task types: Appointment, Task, Collection & Service task. The required settings are:

  • The device parameter Appointment_creator_enable should be set to value 0
  • Configure, per task type, the specific properties of the Settings file.

e.g. the properties regarding a task of type Appointment

Property Comment
NewAppointmentEnabled For possibility of entering an appointment or not, set the value True or False respectively
AppointmentPersonList A command of type AppointmentSiteInvForm is required
AppointmentNewCommand A command of type AppointmentSiteNewForm is required
NewMultiAppointment A command of type NewMultiAppointment is required

Note that, the same apply for all other available task types.

Button New/ Address or Appointment

This is an alternative scenario to enable creating a new record from the Calendar form. Based on product configuration, this scenario is available only for the Appointment task type and the new appointments can be created by selecting persons or by selecting previous appointments. The required settings are:

  • The device parameter Appointment_creator_enable should be set to value 1
  • Configure the specific properties of the Settings file.
Property Comment
NewAppFromSiteVisitPlanCommand A command of type NewAppFromSiteVisitPlan is required
NewAppFromAppVisitPlanCommand A command of type NewAppFromAppVisitPlan is required
VisitPlanCommand A command of type VisitPlanCommand is required

Note that, via VisitPlanTrayWidth property (file: CalendarTaskSettings) the ability to define the preferable width of the selection screen is provided. The property can get values from 0 to 1, where 1 corresponds to 100% of the screen width.

Button Plan

This is an alternative scenario to enable creating a new record from the Calendar form. Based on product configuration, this scenario is available only for the Appointment task type and enables creating new appointments based on a predefined plan. To do this we must configure the following properties in the Settings file:

Property Comment
NewAppFromVisitPlanCommand A command of type NewAppFromSiteVisitPlan is required
SVisitPlanCommand A command of type VisitCalendarListForm is required

Attached documents

The attached documents screen is predefined by the ESMobile application and no extensive customization is supported. This section refers to the issues of downloading, attaching and previewing attached documents.

Attachments downloading

MOB-ImplementationGuide EN-image119.PNGUsing MOB-ImplementationGuide EN-image123.png“Actions” button on the attached documents screen, the ability to download documents from back office to the device is provided. With the completion of the downloading process, the icon that indicates the not downloaded documents (icon MOB-ImplementationGuide EN-image124.png) is substituted with the icon related to the specific type of each document.

File attaching

Using the buttons MOB-ImplementationGuide EN-image125.png orMOB-ImplementationGuide EN-image126.png on the attached documents screen, the ability to attach an image or audio file is provided. Alternatively, the ability to attach another application’s file (Acrobat application) to an ESMobile entity is given via the "Open in ..." process.

Attachment previewing

Focusing on the attached document and using MOB-ImplementationGuide EN-image123.png“Actions” button, the ability either to send the document via email or to preview it through the environment of another application (e.g. Acrobat application) is given. Return to ESMobile application is performed by the “Back to” button.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

Based on product configuration, the ability to attach another application’s file is activated only on specific screens of the ESMobile application but -on a customization level- this feature can be extended furthermore (see section Ideas & solutions/ Work environment/ Competition attached documents)

Nearby customers

Through the Nearby customers screen we can display, as a list or as pins on the map, the points of sales located 10 km from the device’s current position while using the “Radius” area we can limit or expand our selection. The command type to be used for the implementation of this screen is the NearestSiteListForm. Note that, on a customization level, the ability to alter the specifications of the persons to be displayed is given.

Questionnaire

The questionnaires are used as a tool of collecting “predefined” information regarding either company’s customers or anonymous third parties. The data entry screen of a Questionnaire is predefined by the ESMobile application and no extensive customization is supported. Note that, on a customization level, the ability to add an MOB-ImplementationGuide EN-image123.png“Actions” button is given (see section Ideas & solutions/ EditForm/ Actions button)

Photo

Photo shootings serve the need of recording, as image files, information related to company’s customers. The data entry screen of a Photo task is predefined by the ESMobile application and no extensive customization is supported.

Confirmation & Signature

MOB-ImplementationGuide EN-image127.PNGThrough Confirmation & Signature screen, we can display the elements of a record in a report form and present it to the customer, so that if he agrees with the data he can sign it. We can call a confirmation & signature form from the data entry screen of a generic task or a document. The required settings are:

  • Enable the signature attachment functionality on document type or task type having the ability to choose between optional or mandatory signature.
  • Create a command of type ConfirmationCommand. The property SignatureType, depending on whether the command is associated with a document or task should be set to 3 or 5 respectively. In properties MailMergeCommand & PrintCommand we declare the file with the display format & the file which describes the print form. With properties AutoEmail & AutoPrint we state whether we want to e-mail or print automatically when the confirmation & signature form is closed.
  • Add the above command in the file Actions.xml of the form associated with the task type (e.g. GenericTaskForm/es.mch)

e.g. to show a confirmation & signature form when completing a Count task

(a) Create the command SampleTaskConfirmation.xml

<SampleTaskConfirmation Assembly="Entersoft.Mobile.ESSalesForce"

Type="Entersoft.Mobile.ESMobile.ConfirmationCommand">

<Params>

<SignatureType Type="System.Int32" Value="5" />

<MailMergeCommand Type="System.String" Value="MailMergeTask" />

<AutoEmail Type="System.Boolean" Value="false" />

<PrintCommand Type="System.String" Value=""/>

<AutoPrint Type="System.Boolean" Value="false" />

</Params>

</SampleTaskConfirmation>

(b) Add this command to the file Actions.xml of the Count task data entry screen

<ActionDefinition>

<Height>50</Height>

<ConfirmationCommand>SampleTaskConfirmation</ConfirmationCommand>

<Actions>...

</ActionDefinition>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

Particularly for the document entity, the ability to enable the signature attachment functionality under specific conditions is given (see section Ideas & solutions/ DocForm/ Document’s signature)

Collection view

Photo gallery is a special type of screen where we can display data of an entity in the form of a photo. The Photo gallery type form can be used either as a standalone screen or as a selection form in a data entry screen.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

For detailed customization instructions for a form of type Photo gallery see the manual MOB-Photo gallery supplied with the ESMobile application.

Add-on development

In this section we will develop issues relating to the customization capabilities in screens, data, database schema and functionality of the ESMobile application.

Screens

Command-Properties

The following table lists the available properties, per command type, as well as the functionality given by each one of them to ESMobile application screens.

ActionsCommand (String) EditForm

The available entries of button MOB-ImplementationGuide EN-image123.png“Actions”. The definition of the button’s entries is performed via the use of a CommandSelector command.

MOB-ImplementationGuide EN-image128.png As an example of the use of this property, see section Ideas & Solutions/ EditForm/ Actions button.

AllowZeroLines (Boolean) DocForm-Document
Allows the insertion of a document -based on task- that has no lines.
AskMessage (String)
Allows configuring a warning message through which the option of action’s execution (button: OK) or not execution (button: Cancel) is given.

MOB-ImplementationGuide EN-image129.PNGe.g. to display a warning message when executing the add new Count action

<MerchandisingSiteNewForm Assembly="Entersoft.Mobile.ESMerchandize"

Type="Entersoft.Mobile.ESMerchandize.NewTaskFromSiteCommand">

<Params>

<AskMessage Type="System.String" Value="Add new stock counting?" />

</Params>

</MerchandisingSiteNewForm>

AutoSave (Boolean) DocForm-Document
Allows the simultaneous insertion & save of an auto generated document.
BaseInsert (String) EditForm
The screen’s main insert query.
BaseSelect (String)
The screen’s main select query.
BaseUpdate (String) EditForm
The screen’s main update query.
CacheSearchPanel (Boolean)
Allows, while opening a screen, filtering selected options to be recalled.
CreateHeaderQuery (String) DocForm
The query that sets values to auto generated document’s header fields.
CreateLinesAnalysisQuery (String) DocForm-Document
The query that sets values to auto generated document’s line analysis fields.
CreateLinesQuery (String) DocForm

The query that sets values to auto generated document’s line fields.

MOB-ImplementationGuide EN-image128.png For examples on the usage of these properties, see section Ideas & Solutions/ DocForm/ Document auto generation.

CreateTaskItemSQL (String) DocForm-Generic task

The query that sets values to auto generated task’s line fields.

MOB-ImplementationGuide EN-image130.png The property is available only in NewTaskFromCampaign type commands.

DetailRelatedFields (String) DocForm-Generic task

MOB-ImplementationGuide EN-image84.png Obsolete property, its use should be avoided.

MOB-ImplementationGuide EN-image130.png Since version 2.70 of ESMobile application, the suggested method of “synchronizing” line fields’ value is via the Business rules tool (Activation: 0-OnChangeField).

DetailRequiredFields (String) DocForm-Generic task

MOB-ImplementationGuide EN-image84.png Obsolete property, its use should be avoided.

MOB-ImplementationGuide EN-image130.png Since version 2.70 of ESMobile application, the suggested method of declaring mandatory fields is via the Business rules tool (Activation: 2-OnSave).

DocType (String) DocForm-Document

The document’s type. Declaring this property is required only in cases when the document’s type is not defined in the relevant action button.

MOB-ImplementationGuide EN-image128.png For further information regarding action button’s settings, see section: Display screens/ List (ListForm)/ Form/ Action buttons.

DoneButtonTitle (String) InvForm

The caption regarding screen’s “Accept” button.

MOB-ImplementationGuide EN-image130.png The functionality is activated only in case when the InvForm is assigned directly to a menu entry.

Editable (Boolean) EditForm
Gives the ability to prevent record editing.
ESQueryID (String)

Allows using a common select query, in several screens, that “replaces” the BaseSelect property. The name of a file located in folder CSConfig/Queries must be declared as the property’s content.

MOB-ImplementationGuide EN-image128.png Variable [WHERE] activates all filtering criteria declared in property “Filter” of the main command.

e.g. to use query PersonList as a common select query in screens “Distributors” & “Competitors”

<ESQuery

ID = "PersonList"

SQL ="select ... from ESGOPerson p [WHERE]"/>

<DistributorListForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.ListFormCreatorCommand">

<Params>

<Filter Type="System.String" Value="p.Distributor = 1 and p.Inactive = 0" />

<ESQueryID Type="System.String" Value="PersonList" />

</Params>

</DistributorListForm>

<CompetitorListForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.ListFormCreatorCommand">

<Params>

<Filter Type="System.String" Value="p.Competitor = 1 and p.Inactive = 0" />

<ESQueryID Type="System.String" Value="PersonList" />

</Params>

</CompetitorListForm>

ExecuteCondition (String)
Allows configuring, via the definition of a query, whether an action will be executed (value: 1) or not (value: 0). When the query results to at least one record with value 0, the action is not executed.

e.g. to execute add new Count action only when current shift is active

<MerchandisingSiteNewForm Assembly="Entersoft.Mobile.ESMerchandize"

Type="Entersoft.Mobile.ESMerchandize.NewTaskFromSiteCommand">

<Params>

<ExecuteCondition Type="System.String" Value="

select

case when date(StartDate)=date('now') and EndDate is null then 1

else 0 end

from ESTMShift" />

</Params>

</MerchandisingSiteNewForm>

ExtraCommand (String)
Allows configuring extension of command’s main queries (e.g. extended by the addition of further joins)
Filter (String)

The “static” filtering criteria. Use can use:

  • a column declared in the base select query

e.g. <Filter Type="System.String" Value="p.Distributor = 1 and p.Inactive = 0"

  • one of the predefined variables

e.g <Filter Type="System.String" Value="p.GID = ‘[CURRENT]’"

  • a combination of column & variable

e.g. <Filter Type="System.String" Value=" p.PersonKind = 0 and p.GID = ‘[CURRENT]’"

FilterBy (String) InvForm

Allows the limitation of the selection list based on the content of other related fields.

MOB-ImplementationGuide EN-image130.png For further information regarding property settings, see section: Display screens/ Selection list (InvForm)/ Form/ Typical selection list.

FormID (String)
The CSForms folder referring to the form associated with the specific command.
GroupBy (String)
The screen’s data grouping factors.
HasValidData (String) DocForm-Document
Allows configuring, via the definition of a query, the condition required in order add new document action to be executed. When the query results no records, the action is not executed.

e.g. to execute add new Order action only when current shift is active

<NewDocumentfromSite Assembly="Entersoft.Mobile.ESMobile" Type="Entersoft.Mobile.ESMobile.NewDocumentFromSiteCommand">

<Params>

<HasValidData Type="System.String" Value="

select 0

from ESTMShift

where date(StartDate)=date('now') and EndDate is null" />

</Params>

</NewDocumentfromSite>

HeaderRelatedFields (String) DocForm-Generic task

MOB-ImplementationGuide EN-image84.png Obsolete property, its use should be avoided.

MOB-ImplementationGuide EN-image128.png Since version 2.70 of ESMobile application, the suggested method of “synchronizing” line fields’ value is via the Business rules tool (Activation: 0-OnChangeField).

HeaderRequiredFields (String) DocForm

MOB-ImplementationGuide EN-image84.png Obsolete property, its use should be avoided.

MOB-ImplementationGuide EN-image128.png Since version 2.70 of ESMobile application, the suggested method of declaring mandatory fields is via the Business rules tool (Activation: 2-OnSave).

MOB-ImplementationGuide EN-image130.png Since version 3.2 of ESMobile application, to facilitate the declaration of mandatory fields, the ability to define them on a form basis is also provided (for guidelines see RequiredFields property)
ImageColumn (String) InvForm

The column linking the list records with the relevant image file.

MOB-ImplementationGuide EN-image130.png For further information regarding property settings, see section: Display screens/ Selection list (InvForm)/ Image type column.

ImageDirectory (String) folderInvForm

The image files storage folder.

MOB-ImplementationGuide EN-image128.png For further information regarding property settings, see section: Display screens/ Selection list (InvForm)/ Image type column.

ImageExtension (String) InvForm

The image files type.

MOB-ImplementationGuide EN-image128.png For further information regarding property settings, see section: Display screens/ Selection list (InvForm)/ Image type column.

IsParamsPanel (Boolean) EditForm
Allows the display of a screen that states the required, for EBS view execution, parameters.
IsTask (Boolean) EditForm
Activates the options 1-Save, 2- Save & Complete, 3-Save & Cancel of the “Save” button.
LoadDataOnOpenForm (Boolean) LsitForm &InvForm
Allows instant data loading (value: true) or loading after the completion of list’s filtering criteria (value: true).
MailBCCRecipientSQL (String) ReportForm
The select query referring to the e-mail screen’s “Bcc” field. Available only in MailMergeCommand command type.
MailCCRecipientSQL (String) ReportForm
The select query referring to the e-mail screen’s “Cc” field. Available only in MailMergeCommand command type.
MailRecipientSQL (String) ReportForm
The select query referring to the e-mail screen’s “To” field.
Modal (Boolean) InvForm

Gives the ability to display a screen as modal.

MOB-ImplementationGuide EN-image128.png The functionality is activated only in case when the InvForm is assigned directly to a menu entry.

MultiSelect (Boolean) InvForm

Enables multiple selections on list’s records.

MOB-ImplementationGuide EN-image128.png If the selection list is assigned to an action button of a DocForm, the multiple selection functionality is automatically enabled.

NoDetail (Boolean) DocForm-Generic task
In case of generic tasks without lines (e.g. Complaint) the property must be declared as true.
NullCustomer (Boolean) DocForm-Document
In case of document type not referring to customer (e.g. Stock delivery note) the property must be declared as true.
OnCompleteValidation (String) EditForm
Allows configuring, via the definition of a query, the condition required in order task’s save-complete or save-cancel options to be feasible. When the query results to at least one record, the save action is not executed displaying as error message the content of query’s 1st column-line.

e.g. to prevent Appointment’s save-complete when current shift is not active

<AppointmentEditForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.EditFormCreatorCommand">

<Params>

<OnCompleteValidation Type="System.String" Value="

select 'No active shift. Competing the appointemnet is not allowed.'

from ESTMShift

where date(StartDate)=date('now') and EndDate is not null" />

</Params>

</AppointmentEditForm>

OnSelectCommand (String) InvForm

Allows configuring the command to be executed while pressing button “Select”. The action is performed on list’s selected records.

MOB-ImplementationGuide EN-image128.png The functionality is activated only in case when the InvForm is assigned directly to a menu entry.

OnStartValidation (String)
Allows configuring, via the definition of a query, the condition required in order the command’s execution to be feasible. When the query results to at least one record, the action is not executed displaying as error message the content of query’s 1st column-line.

e.g. to prevent add new Count action when current shift is not active

<MerchandisingSiteNewForm Assembly="Entersoft.Mobile.ESMerchandize"

Type="Entersoft.Mobile.ESMerchandize.NewTaskFromSiteCommand">

<Params>

<OnStartValidation Type="System.String" Value="

select 'No active shift. Add new stock counting is not allowed.'

from ESTMShift

where date(StartDate)=date('now') and EndDate is not null" />

</Params>

</MerchandisingSiteNewForm>

OrderBy (String)

The screen’s data sorting criteria.

MOB-ImplementationGuide EN-image130.png Since version 2.70 of ESMobile application, the suggested method of declaring the sorting criteria is via the SortBy property.

PostSaveCommand (String)
Allows configuring the command to be executed after saving a record.
RefreshParent (Boolean)
Gives the ability to refresh dashboard screen’s elements after the execution of a SQLCommand.

e.g. to refresh Appointment’s dashboard elements after pressing the “Complete” action button

  1. Activation of RefreshParent property in appointment’s completion command

<SQLAppComplete Assembly="Entersoft.Mobile.ESMobile" Type="Entersoft.Mobile.ESMobile.SQLCommand">

<Params>

<RefreshParent Type="System.Boolean" Value="True" />

</Params>

</SQLAppComplete>

  1. Declaration of the column referring to primary key in appointment’s dashboard screen (CalendarTasksForm/ ExtraLayoutParams)

<primarykeycolumn>TaskGID</primarykeycolumn>

<primarykeyquerycolumn>task.GID</primarykeyquerycolumn>

RelatedFields (String) EditForm

Gives the ability of “synchronizing” the value of a field based on another field’s value changes. The required definition is:

MainField1[,]RelatedField1[=]Relation1[,]RelatedField2[=]Relation2[;]

MainField2[,]RelatedField1[=]Relation1[,]RelatedField2[=]Relation2

e.g. to set, in Customer edit screen, the value of “Profession description” & “Discount” based on the value of “Profession” & “Payment method” respectively

<CustomerEditForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.EditFormCreatorCommand">

<Params>

<RelatedFields Type="System.String" Value="

fActivityCode[,]ActivityDescription[=]

select Description,Description from ESGOZActivity where Code = '[fActivityCode]'[;]

fPaymentMethodGID[,]Discount[=]

select NumericField1,NumericField1 from ESFIPaymentMethod where GID = '[fPaymentMethodGID]'" />

</Params>

</CustomerEditForm>

RequiredFields (String) EditForm
The mandatory fields (comma separated list). The ability to define a condition (using numeric fields) is also given.
MOB-ImplementationGuide EN-image130.png Since version 3.2 of ESMobile application, to facilitate the declaration of mandatory fields, the ability to define them on a form basis is also provided (property: Required). The ability to define a condition (using numeric fields) is also given. The functionality is available in all types of fields (except numeric). Note that, the definition of mandatory fields on a form basis overrides any definition that has been made in command’s RequiredFields property.

e.g. to define as mandatory (a) the field “Name” and (b) the field “Price list” only in case when the field Price zone = 1

1st solution: on command basis

<CustomerEditForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.EditFormCreatorCommand">

<Params>

<RequiredFields Type="System.String" Value="Name,fPriceListGID#PriceZone=1" />

</Params>

</CustomerEditForm>

2nd solution: on form basis

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="Label" Value="Name" />

<Property Name="DataMember" Value="Name" />

<Property Name="Name" Value="Name" />

<Property Name="Required" Value="true" />

</Item>

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="Label" Value="Price list" />

<Property Name="DataMember" Value="fPriceListGID" />

<Property Name="Name" Value="fPriceListGID" />

<Property Name="Tag" Value="TaskCategory3InvForm#GID#Code#ESTMTaskCategoryValue" />

<Property Name="Required" Value="fPriceListGID#PriceZone=1" />

</Item>

RequiresExtraPin (Boolean)
Allows configuring whether the action’s execution is protected via a PIN provided by an EBS authorized user.

MOB-ImplementationGuide EN-image131.pnge.g. for request of approval by an EBS authorized user on add new Count action

<MerchandisingSiteNewForm Assembly="Entersoft.Mobile.ESMerchandize"

Type="Entersoft.Mobile.ESMerchandize.NewTaskFromSiteCommand">

<Params>

<RequiresExtraPin Type="System.Boolean" Value="true" />

</Params>

</MerchandisingSiteNewForm>

MOB-ImplementationGuide EN-image128.png The required PIN is generated in back-office via a specific EBS automation.

RequiresPassword (Boolean)
Allows configuring whether the action’s execution is protected via the user’s password.MOB-ImplementationGuide EN-image132.png

e.g. for request of user password on add new Count

<MerchandisingSiteNewForm Assembly="Entersoft.Mobile.ESMerchandize"

Type="Entersoft.Mobile.ESMerchandize.NewTaskFromSiteCommand">

<Params>

<RequiresPassword Type="System.Boolean" Value="true" />

</Params>

</MerchandisingSiteNewForm>

SaveMenu (String)
Allows configuring the save button options. The typical options are: 1-Save, 2-Save & Complete, 3-Save & Cancel.
ScalesToFit (Boolean) ReportForm & HtmlReport
Allows shrinking based on the available display area.
Scroller (String) InfoForm
The folder-code of EBS relevant view.
ScrollerGroup (String) HtmlReport
The folder of EBS relevant view.
ScrollerID (String) HtmlReport
The code of EBS relevant view.
SQL (String) ReportForm
The screen’s main select query.
SubjectSQL (String) ReportForm
The select query referring to the e-mail screen’s “Subject” field.
SearchPanelFilter (String)

The screen’s data alternative filtering criteria.

MOB-ImplementationGuide EN-image128.png For further information regarding property settings, see section: Display screens/ List (ListForm) Command/ Filter records.

SearchPanelID (String)
Allows using a common search panel, in several screens, that “replaces” the SearchPanelFilter property. The name of a file located in folder CSConfig/SearchPanels must be declared as the property’s content.
SelectaAllEnabled (Boolean) InvForm
Allows the display of “Select all” button. Setting property MultiSelect as true and adding column Qty in command’s query are a prerequisite.
ShowDocument (Boolean) DocForm-Document
Allows the non-appearance of auto generated document.
ShowMessage (String)

Allows configuring, via the definition of a query, the condition required in order the display of a message to be feasible. When the query results to at least one record, a message with the content of query’s 1st column-line is displayed.

MOB-ImplementationGuide EN-image128.png As an example of the use of this property, see section Ideas & Solutions/ ListForm/ Conditional info message.

SortBy (SortBy)

The screen’s data alternative sorting criteria

MOB-ImplementationGuide EN-image128.png For further information regarding property settings, see section: Display screens/ List (ListForm) Command/ Sort records.

TaskType (String) EditForm & DocForm-Generic task
The task’s type. Regarding the named tasks the available options are: 1-Appointment & 3-Todo, though regarding the generic tasks, the declaration of the relevant InternationalID is provided.
Title (String)
The command’s relevant screen caption.
ValidateDataEnabled (Boolean)
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.

Command-Variables

Genaral Only in Item’s selection lists
[CURRENT] [FITEMGID] [FADDRESSGID]

Also available are all header fields. In this case, the declaration of the variable should be in the form: [Field name]

(e.g. [fTradeAccountGID] for the field referring to the GID of Trade Account entity)

[PARENT] [FCATALOGUEITEMGID] [DOCTYPE]
[USERID] [TASKENDDATE] [FCAMPAIGNGID]
[APPLICATIONID] [TASKBEGINDATE] [PRODUCTPROPOSALGID]
[BRANCHGID] [LEVEL]
[CAMPAIGNGID] [MULTIPLIER]

AdvancedList-Properties

This section refers to the available in ESMobile application properties of the AdvancelList type forms, as well as the setting options per screen type & column type

  • TextCell. The TextCell column type is used to display the content of a column as text and is available in all screen types. Note that, in the case of a TextCell column type, the settings options of CellSource & Name properties vary considerably depending on the screen type and the row type. The setting options per case are:
screen type: all types row type: Row
CellSource Column alias or Value for translation*
Name - Translation key
screen type: DocForm row type: SectionRow
CellSource Reserved word or Value for translation*
Name - Translation key
screen type: DocForm row type: TotalRow
CellSource Header's Field name or Value for translation* or - or -
Name - Translation key Reserved word Total_Lines's Field name
* In any case, the Value for translation syntax should have the following form: &quot;ColumnLabel&quot;

Detailed information regarding TextCell “Column formatting” properties, is given at the relevant sections of this document.

  • ButtonCell. The ButtonCell column type is used as an action button and is available in ListForm, DocForm & CollectionView screen types. Detailed information regarding ButtonCell properties and settings is given in section Display screens/ List (ListForm)/ Form/ Action buttons.
  • ImageCell. The ImageCell column type is used to display an image and is available in DocForm & CollectionView screen types. Detailed information regarding ImageCell properties and settings is given at “Image type column” sections of this document.

The following table lists the available in ESMobile application properties of the AdvancedList type forms, indicating the screen type in which each property is available.

MOB-ImplementationGuide EN-image133.png

Data

Mobile parameters

The configuration of ESMobile application functional parameters is implemented in back-office via the menu entry “Mobile parameters” (menu: Tools & Configuration/ Customization/ Mobile devices). The configuration implemented at this point applies to all devices. Differentiation in the behavior per device is provided by declaring, in page “Parameters” of the specific device, the name-value of the particular parameter. The parameters configuration per device is initially stored in an EBS table (table ES00DeviceParam) and then provided to devices via the data synchronization process.

Main entities

CatalogueItemFieldImageName
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
DaysNewPerson MedRep
Number of days to qualify a customer as a new entrant of the device user’s territory. e.g. 7
GPS_AskPinSite
Activates, when entering a new address, the functionality related to the identification of current geographical position. 0-No or 1-Yes
ImageFileExtension
The image files type. In order item-item’s image linking to be feasible, folder ProductImages must contain relevant image files of the specific type. e.g. jpg
Item_ShowThumbs
Enables the display of image column in investigation lists. 0-No or 1-Yes
Item_URL_first_part
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
ItemFieldImageName
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
LegalSiteTypeDefaultCode
The default, when entering a new address, address type. e.g. headquarters
MOB-ImplementationGuide EN-image130.png The parameter’s content must match to the code of an “ESGOZSiteType” table entry.
PhysicalSiteTypeDefaultCode
The default, when entering a new contact person, address type. e.g. RESIDENCE
MOB-ImplementationGuide EN-image128.png The parameter’s content must match to the code of an “ESGOZSiteType” table entry.
PreferredCountryInternationalID
The default, when entering a new address, country code. e.g. GR
MOB-ImplementationGuide EN-image128.png The parameter’s content must match to the code of an “ESGOZCountry” table entry.
Site_IBAN_ValidationField
The address’s field assigned to IBAN bank account. e.g. StringField1

Tasks

App_Days_Edit_Allowed
The number of days for allowing interventions in old appointments. By setting the value 0, the check is completely deactivated. e.g. 7
Appointment_ContextActions_Disabled
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Appointment_creator_enable
The appointment’s adding, via calendar button “New”, scenario. 0-List or 1-Plan
Appointment_is_Container
Allows configuring whether add new action buttons will be also available in customer & point of sales dashboard screen. 0-No or 1-Yes
AppointmentInternationalID
The International ID of “Sales appointment” task type. e.g. ES.SAP
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via the relevant company parameter.
AppointmentTargetFieldName
The appointment’s field assigned to targeted turnover. e.g. NumericField1
Calendar_show_closed_tasks
Display completed or canceled appointments on the Calendar screen 0-No or 1-Yes
CaseTaskTypeGID
The International ID of “Case” task type. e.g. ES.CASE
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via the relevant company parameter
ComplaintInternationalID
The International ID of “Complaint” task type. e.g. ES.COM
MOB-ImplementationGuide EN-image128.png The parameter’s configuration is performed via the relevant company parameter
DefaultMinutesAppToEnd
Appointment’s default duration (minutes). e.g. 60
MOB-ImplementationGuide EN-image130.png Since version 3.2 of ESMobile application, the specific parameter is obsolete. The default duration is set on a task type level.
DefaultMinutesAppToPrepare
Appointment’s default preparation time (minutes). This information is used by appointments’ bulk adding processes as an interval between two appointments. e.g. 30
MOB-ImplementationGuide EN-image130.png Since version 3.2 of ESMobile application, the specific parameter is obsolete. The default preparation time is set on a task type level.
DefaultMinutesPRMToEnd
Preventive maintenance activity’s default duration (minutes). e.g. 60
MOB-ImplementationGuide EN-image130.png Since version 3.2 of ESMobile application, the specific parameter is obsolete. The default duration is set on a task type level.
DefaultMinutesROSToEnd
Replacement activity’s default duration (minutes). e.g. 60
MOB-ImplementationGuide EN-image128.png Since version 3.2 of ESMobile application, the specific parameter is obsolete. The default duration is set on a task type level.
DefaultMinutesSOSToEnd
Service on site activity’s default duration (minutes). e.g. 60
MOB-ImplementationGuide EN-image130.png Since version 3.2 of ESMobile application, the specific parameter is obsolete. The default duration is set on a task type level.
DefaultMinutesTskToEnd
To do task’s default duration (minutes). e.g. 60
MOB-ImplementationGuide EN-image130.png Since version 3.2 of ESMobile application, the specific parameter is obsolete. The default duration is set on a task type level.
DefaultWinLossCode
Opportunity’s default win-loss reasoning. e.g. PRICE
MOB-ImplementationGuide EN-image128.png The parameter’s content must match to the code of an “ESTMZOppWonLost” table entry.
EndWorkingTime
The end time of company’s working hours. The information is used by appointments’ bulk adding processes. e.g. 17:00
ESTMTaskItemExtended
Activates the functionality referring to the usage of task line’s additional non stored fields. 0-No or 1-Yes
MorningZoneEndTime
The morning zone end time. The information is used to define the non-greyed area of the calendar screen. e.g. 14:00
MorningZoneStartTime
The morning zone starting time. The information is used to define the non-greyed area of the calendar screen. e.g. 09:00
OpportunityInternationalID
The International ID of “Sales opportunity” task type. e.g. ES.OPP
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via the relevant company parameter.
Photo_PreferredQuality
The image files’ degree of compression. Specifies the file size in bytes. e.g. 70
Photo_PreferredSize
Specifies the image files dimensions. e.g. 346,245
POS_related_property_set_code
The code of “Property set” table entry referring to the data collection questionnaire designed for point-of-sales status recording. e.g. RDC_POSStatus
MOB-ImplementationGuide EN-image128.png The parameter’s configuration is performed via the relevant company parameter.
Questionnaire_Rate_Decimals
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Questionnaire_Rate_Maximum
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Questionnaire_Rate_Minimum
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Service_show_document_created_by_SOS Service
Automatic display of the sales delivery note issued in the content of a specific service activity. 0-No or 1-Yes
Service_van Service
Activates the functionality related to van warehouse monitoring. 0-No or 1-Yes
SOS_AskUpdateActualStartDateMessage
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
SOS_AskUpdateArrivalDateMessage
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
SOS_ReadOnlyControl Service
The level of control for prohibiting interventions on “closed” service activities. 0-No check, 1-After saving or 2-After signing
StartWorkingTime
The start time of company’s working hours. The information is used by appointments’ bulk generation processes. e.g. 09:00
Task_failure_status
The caption referring to status option (3). e.g. Canceled
Task_in_progress_status
The caption referring to status option (1). e.g. In Progress
Task_MCH_GroupField
The field that is used as the task lines grouping factor. e.g. ItemFamilyCode
Task_MCH_OrderQuantityFormula
A formula used for assignments to line numeric fields. Fields available in the formula are: Quantity, OrderQuantity and NumericField1-5. Quantity*2@OrderQuantity
MOB-ImplementationGuide EN-image128.png Since version 2.70 of ESMobile application, the suggested method for assignments to line fields is via the Business rules tool (Action: 0-Assign).
Task_mch_ShelfShareCategory
The items grouping factor to be used by the “Shelf Share” task type. 0-Family or 1-Group or 2-Category or 3-Subcategory
Task_open_status
The caption referring to status option (0) e.g. Open
Task_OrderBy_Definition
The field that is used as the task lines sorting factor. If lines are grouped, the grouping factor must be declared as the 1st sorting factor. e.g. Code#ItemCode#1

MOB-ImplementationGuide EN-image130.png Since version 2.70 of ESMobile application, the suggested method of line sorting is via section SortBy of Actions.xml file.

MOB-ImplementationGuide EN-image128.png The sort action interprets all fields as text fields. In order sorting by a numeric field to be accurate, the “conversion” of number to text is a prerequisite (see section Ideas & Solutions/ DocForm/ Sort lines).

Task_RDC_CopyLastSurvey
Activates, when entering a new “Data collection” questionnaire, the functionality of auto completing the responses based on the most resent responses. 0-No or 1-Yes
Task_SavePerLine
Enables task saving, as 3-Temporary, after each line insertion. 0-No or 1-Yes
Task_success_status
The caption referring to status option (2). e.g. Completed
TaskItem_IsFocusedField
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
TaskItem_PrevCountQty_Field
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
TaskItem_PrevSoldQty_Field
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
TaskItemInstDateField
The Installation task’s field assigned to deinstallation date. e.g. DateField1
TaskItemInstSNField
The Installation task’s field assigned to product serial number. e.g. StringField1
ToDoInternationalID
The International ID of “Sales task” task type. e.g. ES.STK
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via the relevant company parameter.
VisitPlanSelectionEnabled
Activates, in appointments’ plan execution process, the ability to select specific points of sales. 0-No or 1-Yes
YammerClientID
The yammer client’s name. JanQVp5sQd7AdJe5GfB4Q
YammerConversationURL
The URL referring to corporate yammer.
YammerEnabled
Activates the functionality of posting photos on yammer. 0-No or 1-Yes
YammerGroupID
The yammer group. e.g. 4470839
YammerRedirectURL
The connecting to yammer URL. essfa://yammer
YammerSecret
The connecting to yammer code. RQMPINsvo1vNOMvrukPPhqax5jZY0SqQYKyf5A

Sales

ApplyInvoicePolicy
Enables the user’s rights to execute the online business policy process via a 3G connection. 0-No or 1-Yes
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via mobile device’s field “Communication permissions”.
ApprovalRequestInternationalID xVan
The International ID of “Credit control excess request” task type. e.g. es.cce
Barcode_AddItemAfterScan
Allows configuring the functionality of barcode scanning area. 0-Nothing or 1-Add Line
Barcode_AutoQnt
Enables the simultaneous insertion of item & quantity via barcode scanning. 0-No or 1-Yes
Barcode_ClearAfterScan
Allows configuring whether the barcode scanning area will be cleared after each line insertion. 0-No or 1-Yes
Barcode_LogNotFound
Enables the logging of “failures” in barcode scanning. 0-No or 1-Yes
Barcode_SearchMethod
The order in which the barcode identification is executed. e.g. 1-2

MOB-ImplementationGuide EN-image128.png The available options are:

1-field “Code” of table Item (ESFIItem)

2-field “Barcode” of table Item (ESFIItem)

3-field “Barcode” of table Multiple item codes (ESMMItemCodes)

4-based on a formula defined in BarcodeProcessor.xml file (folder ESMobile\ESConfig)

e.g. for an 18 characters barcode referring to Item Code/Color/Size/Quantity

<BarcodeProcessor Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.BarcodeProcessorCommand">

<Params>

<ItemDefinition Type="System.String" Value="1,6" />

<ColorDefinition Type="System.String" Value="7,3" />

<SizeDefinition Type="System.String" Value="10,3" />

<QuantityDefinition Type="System.String" Value="13,4" />

<QuantityDecimalsDefinition Type="System.String" Value="17,2" />

<SQL Type="System.String" Value="" />

</Params>

</BarcodeProcessor>

where each property definition must be in the form: Start,Length.

Barcode_UseCamera
Enables the functionality of using the device’s camera as barcode scanner. 0-No or 1-Yes
Barcode_UseKeyboard
Enables the numeric keyboard in barcode scanning area. 0-No or 1-Yes
cce_duration_days xVan
Credit control excess request’s default duration (days). e.g. 3
CompetitionScroller
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
CountCatalogueItems xVan
Defines whether the stock count quantity refers to Catalogue items. This information is used by the algorithms of calculating Marketing programs target achievement. 0-No or 1-Yes
MOB-ImplementationGuide EN-image128.png The parameter’s configuration is performed via the company parameter “Measurement in catalogue items”
DOC_ADD_SEPARATOR_Prefix_Series
Allows configuring whether the prefix-series separator is part of the document’s code. 0-No or 1-Yes
MOB-ImplementationGuide EN-image128.png The parameter’s configuration is performed via the relevant company parameter.
DOC_ADD_SEPARATOR_Series_Number
Allows configuring whether the series-number separator is part of the document’s code. 0-No or 1-Yes
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via the relevant company parameter.
Doc_AllowEditDiscount1
Enables editing of line field Discount-1. 0-No or 1-Yes
Doc_AllowEditDiscount2
Enables editing of line field Discount-2. 0-No or 1-Yes
Doc_AllowEditDiscount3
Enables editing of line field Discount-3. 0-No or 1-Yes
Doc_AllowEditPrice
Enables editing of line field Price. 0-No or 1-Yes
Doc_AllowFreeProductRewards xVan
Enables the inclusion of “Gift item” rewards in invoicing documents. This information is used by the Marketing programs rewarding process. 0-No or 1-Yes
Doc_AllowSaveSet_WithoutOnlineCommercialPolicy xVan
Allows configuring the level of control, when saving a document including composite items. 0-No, 1-Warning or 2-Error
Doc_AllowZeroLines
Allows the insertion of a document that has no lines. 0-No or 1-Yes
Doc_AllowZeroQty
Allows the insertion of a document with line & line analysis that have zero quantity. 0-No or 1-Yes
Doc_AssignDiscount_Field
The field that is used, by mash update discount process, for discount assignment. Disc1 or Disc2 or Disc3
Doc_AutoApplyCommercialPolicy
Activates, while saving the document, the auto execution of online business policy process. 0-No or 1-Yes
MOB-ImplementationGuide EN-image130.png Since version 3.0 of ESMobile application, the specific parameter is obsolete. The document’s preferable behavior is now set on a document type level.
Doc_AutoApplyCommercialPolicy_SiteField
Gives the ability to specify the auto execution of online business policy process on a point-of-sales basis, by declaring the Address field assigned to this functionality. We should ensure that this field has values 0 or 1. e.g. NumericField1
MOB-ImplementationGuide EN-image130.png Prerequisite: “Auto apply business policy” in document type must be activated.
Doc_AutoOpenBarcodePanel
Auto display barcode scanning area. 0-No or 1-Yes
Doc_BarcodeSaveField
The line field where the scanned barcode is stored. e.g. StringField1
Doc_CancelPermissionRequest
Allows configuring whether the document cancelation process is password protected. 0-No or 1-Yes
Doc_CashCollectionOnCreditExcess xVan
Activates the feature of auto issuing a cash receipt in case when the relevant invoice exceeds credit control limits. 0-No or 1-Yes
Doc_CollectionInCash_AutoHide xVan
Activates the feature of not displaying the data entry screen of auto issued cash receipts. 0-No or 1-Yes
Doc_ColorSizeSingle
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_CommercialPolicy_Editable
Allows configuring the level of editing control, after the enforcement of online business policy. 0-No, 1-Yes & 2-Only offer actions
Doc_CustomCreditControl xVan
Gives the ability to specify the credit control checks on a customization level, by declaring a GetDataCommand type command. e.g. GetCheckListDocuments
Doc_DimensionalGrid_ShowBalance
Gives the ability to display, in color-size screen, information regarding current balance per color-size. In order this information to be available, the update of stock level (menu: Sync/ Item balances) is a prerequisite. 0-No or 1-Yes
Doc_DimensionalGrid_ShowDescription
Gives the ability to display, in color-size screen, information regarding color & size description. 0-No or 1-Yes
Doc_DisablePriceList_TAPC
Gives the ability to deactivate the pricing policy process that is based on customer’s pricing group. 0-No or 1-Yes
Doc_ESFILineCheckList_TradeAccountSiteField xVan
The field of ESFILineCheckList table that is used, via the online credit control process, for the assignment of current document’s “Address”. e.g. UDFString1
Doc_ESFILineCheckList_TradeTypeField xVan
The field of ESFILineCheckList table that is used, via the online credit control process, for the assignment of current document’s “Trade type”. e.g. UDFString2
Doc_GetTradeTypeCode
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_GetTradeTypePaymentMethod
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_GiftDiscount_Field
The field that is used, by “Gift” action, for discount assignment. Disc1 or Disc2 or Disc3
Doc_GroupField
The field that is used as the document lines grouping factor. e.g. fItemFamilyCode
Doc_InvestigateItemLimit
Defines the number of selected records when pressing, in a selection list, the button “Select all”. e.g. 30
Doc_InvoiceCash_PaymentMethod
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_InvoiceInCashEditable
Allows to manually characterize an Invoice as “In cash”. In case when the invoice’s customer or payment method have zero credit time, its characterization as in cash is automatically activated and turned as read only. 0-No, 1-Yes, 2-Only on no delay in payment
Doc_ItemDiscountField
The field that is used for item’s discount assignment. Disc1 or Disc2 or Disc3
Doc_ItemInvForm_DefaultQty
Defines the default quantity when pressing, in a selection list, the button “Select all”. e.g. 1
Doc_ItemInvForm_Show_Discs_Price
Allows configuring whether the pricing policy process will be activated in item’s selection screen. 0-No or 1-Yes
Doc_LimitForCashCollection xVan
The Invoice value limit for in cash collections. e.g. 5000
Doc_LineItemTotal_GroupByField
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_max_refers_to_user_discount
Defines whether the maximum discount exceeded control refers only to the line field used by mash update discount process (field stated in mobile parameter “Doc_AssignDiscount_Field”). 0-No or 1-Yes
Doc_MaxDiscCheck_Exclude_100
Defines whether the maximum discount exceeded control filters out 100%. 0-No or 1-Yes
Doc_OrderBy_Definition
The field that is used as the document lines sorting factor. If lines are grouped, the grouping factor must be declared as the 1st sorting factor. e.g. A#ItemCode#1,B#ItemDescription

MOB-ImplementationGuide EN-image128.png Since version 2.70 of ESMobile application, the suggested method of line sorting is via section SortBy of Actions.xml file.

MOB-ImplementationGuide EN-image128.png The sort action interprets all fields as text fields. In order sorting by a numeric field to be accurate, the “conversion” of number to text is a prerequisite (see section Ideas & Solutions/ DocForm/ Sort lines).

Doc_OrderLinesBy
The field that is used as the document lines sorting factor. If lines are grouped, the grouping factor must be declared as the 1st sorting factor. The parameter is activated only in case when the mobile parameter “Doc_OrderBy_Definition” is null. e.g. ItemCode

MOB-ImplementationGuide EN-image128.png Since version 2.70 of ESMobile application, the suggested method of line sorting is via section SortBy of Actions.xml file.

MOB-ImplementationGuide EN-image128.png The sort action interprets all fields as text fields. In order sorting by a numeric field to be accurate, the “conversion” of number to text is a prerequisite (see section Ideas & Solutions/ DocForm/ Sort lines).

Doc_Pricelist_type
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_PrintLog
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_PrintSalesDocumentCommand
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_RePrintPermissionRequest
Allows configuring whether the document reprinting process is password protected. 0-No or 1-Yes
Doc_SavePerLine
Enables document saving, as 3-Temporary, after each line insertion. If the document has series, the functionality is automatically deactivated. 0-No or 1-Yes
Doc_SavePrint
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_SaveSync
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_Series_Number_Max_Length
Defines the number of digits of the document's code e.g. 5
MOB-ImplementationGuide EN-image128.png The parameter’s configuration is performed via the relevant company parameter.
Doc_Series_PrintCommandField
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_signature_enabled
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_SiteDiscountFormula
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_SiteDiscountPercentField
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_SiteDiscountValueField
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_TradeAccountDiscountField
The field that is used for customer’s discount assignment. Disc1 or Disc2 or Disc3
Doc_TradeTypeCode
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_UseCatalogueItems
Enables the catalogue item’s list as a 1st selection level of the item’s selection list.
Doc_VatInTotals
Enables VAT value calculation based on document’s total, per VAT category, net value. 0-No or 1-Yes
DocumentLinePromotionDiscountField xVan
Defines the document line field referring to “Value discount”. This information is used by the Marketing programs rewarding process. e.g. DiscountValue3
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via the relevant company parameter.
ESFISalesDocLineItemExtended
Activates the functionality referring to the usage of document line’s additional non stored fields. 0-No or 1-Yes
FISequentialDiscounts
The method to be applied when calculating line item discounts. 0-Cumulative or 1-Sequential
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via the relevant company parameter.
LTMPPOSInternationalID xVan
The International ID of “Long Term agreement per POS” task type. e.g. ES.LTMPPOS
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via the relevant company parameter.
OrderPerProductProposal
Defines whether the use of one Product proposal note per document is obligatory. 0-No or 1-Yes
PriceDecimals
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Print_2nd_copy_delay_in_sec
The print delay time between printing 2 copies of a document (seconds). e.g. 2
Print_InWords_Mode
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Print_last_copy_delay_in_sec
The print delay time from last copy of a document (seconds) e.g. 2
Print_Mode
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Print_ZebraMacAddress
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
ValueDecimals
Number of decimals in "Value" type fields. e.g. 2

Cash collections

Collection_Default_Note_Type
The default, when issuing a new note, note type. e.g. CHECK RECEIVABLE
Collection_DefaultAddLineMethod
The default data entry mode. 0-Ad hoc or 1-Open items list
Collection_DefaultColPaymentMethod
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Collection_SaveMenu e.g. 1,2,3
Allows configuring the save button options. The typical options are: 1-Save, 2-Save & Complete, 3-Save & Cancel. If the document has series, the option 2-Save & Complete is automatically activated. 1-Save, 2-Save & Complete, 3-Save & Cancel
MOB-ImplementationGuide EN-image130.png If add new Collection command’s property SaveMenu is defined, the command definition overrides parameter definition.
Collection_ShowPopUpSave
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
CollectionLimitPerCustomer
The daily limit, per customer, for collections in cash. e.g. 500
ColPayCashCode
The code assigned to “Cash” collection line. e.g. CASH
MOB-ImplementationGuide EN-image128.png The parameter’s content must match to the code of the payment agreement entry with InternationalID = ES.PM_Cash.
ColPayCheckCode
The code assigned to “Note” collection line. e.g. NOTE
MOB-ImplementationGuide EN-image130.png The parameter’s content must match to the code of the payment agreement entry with InternationalID = ES.PM_Check.
ColPayTransferCode
The code assigned to “Bank transfer” collection line. e.g. TRANSFER
MOB-ImplementationGuide EN-image130.png The parameter’s content must match to the code of the payment agreement entry with InternationalID = ES.MoneyTransfer.
DefaultMinutesColToEnd
Cash collection’s default duration (minutes). e.g. 15
MOB-ImplementationGuide EN-image128.png Since version 3.2 of ESMobile application, the specific parameter is obsolete. The default duration is set on a task type level.
Doc_CollectionInCashProposedAmount
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application. -
Doc_CollectionItem_SetDueDateNull
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_CollectionItem_ValidateFields
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_NoCashCollection_NoSeries
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_PrintCollectionDocumentCommand
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Doc_SyncedCollectionReadOnly
Enables the control of prohibiting interventions on closed receipt notes after sending them to back-office. In case the receipt note’s document series if filled, the check is automatically activated. 0-No or 1-Yes

Miscellaneous

Administrator_Email
The e-mail address to report application’s error messages. e.g. admin@wwf.gr
AllCustomers
Enables the user’s rights to receive, via data synchronization process, the full customers list. 0-No or 1-Yes
MOB-ImplementationGuide EN-image128.png The parameter’s configuration is performed via mobile device’s field “Communication permissions”.
AllowReceive
Enables the user’s rights to execute the data receiving process via a 3G connection. 0-No or 1-Yes
MOB-ImplementationGuide EN-image128.png The parameter’s configuration is performed via mobile device’s field “Communication permissions”.
AllowSend
Enables the user’s rights to execute the data sending process via a 3G connection. 0-No or 1-Yes
MOB-ImplementationGuide EN-image128.png The parameter’s configuration is performed via mobile device’s field “Communication permissions”.
AttachedSitePhotoCategory
The category code referring to point-of-sales image files (attachments). e.g. SITE_PHOTO
MOB-ImplementationGuide EN-image128.png The parameter’s configuration is performed via the relevant company parameter.
AttachmentPath
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
AutoCheckVersion
Enables the functionality of automatic, while entering the ESMobile application, version compatibility check. 0-No or 1-Yes
CallBefore
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
CheckForInternalJobs
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
CradleCommand
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Culture
Defines the display format of localization data (date, number & currency) e.g. el-GR
CurrencyNegativePattern
The negative value format for "Currency Value" type fields e.g. 15
MOB-ImplementationGuide EN-image128.png The available options are:
0 ($n) 4 (n$) 8 -n $ 12 $ -n
1 -$n 5 -n$ 9 -$ n 13 n- $
2 $-n 6 n-$ 10 n $- 14 ($ n)
3 $n- 7 n$- 11 $ n- 15 (n $)
CurrencyPositivePattern
The positive value format for "Currency Value" type fields e.g. 3
MOB-ImplementationGuide EN-image128.png The available options are:
0 $n 1 n$ 2 $ n 3 n $
CurrencySymbol
The currency symbol. Character “space” is used for no symbol. e.g. € or EUR
fDamagedGoodsWHGID xVan
The “Damaged goods” W/H.
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via the relevant field of “Service Profile” entity.
GPS_State
Enables the functionality of recording user’s position. 0 & 1 Yes, 2-No
MOB-ImplementationGuide EN-image128.png The parameter’s configuration is performed via mobile device’s field “Trace method”.
KeyboardMainLanguage
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Map_NearestSiteRadius
Defines the “Customers near me” screen default radius (kilometers). e.g. 10
MessageOnLoginCommand
Gives the ability to specify the user’s messages list on a customization level, by declaring the preferable command. e.g. UnreadUserMessageListForm
ModalNumericKeyboard
Enforces the closing of numeric keyboard only by using "OK" or "Cancel" buttons. 0-No or 1-Yes
NumericKeyboardSizeFactor
The preferable size for the numeric keyboard. Suggested values from 1.1 to 1.8. e.g. 1.3
OnlineServices
Enables the user’s rights to execute the online reporting processes via a 3G connection. 0-No or 1-Yes
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via mobile device’s field “Communication permissions”.
PanicSMSnumber
MOB-ImplementationGuide EN-image84.png Not available in ESMobile application.
Photo_Url
Defines the URL for the storage folder of Photo tasks image files. e.g. http://192.168.1.195/ESMobilePhotos/
MOB-ImplementationGuide EN-image130.png The parameter’s configuration is performed via the relevant company parameter.
ReceiveNewVersion
Enables the user’s rights to execute the version receiving process via a 3G connection. 0-No or 1-Yes
MOB-ImplementationGuide EN-image128.png The parameter’s configuration is performed via mobile device’s field “Communication permissions”.
ShiftFunctionality xVan
Allows configuring the shift functionality options. Selecting the options 1 or 2 results to auto activating, when entering the application, the shift start process. Especially selecting option 2 also results to the auto activation of several checks related to invoicing and data synchronization processes. 0-No, 1-Display on login or 2-Full control
ShiftOnLoginCommand xVan
Gives the ability to specify the shift start process on a customization level, by declaring the preferable command. works in combination with mobile parameter “ShiftFunctionality”. e.g. ShiftOnLoginCommand
Sync_ReplaceInvalidContext
Defines whether, in cases of screen’s form-command incompatibilities, the incompatible values should be replaced with NULL value. 0-No or 1-Yes

User Definable fields

Master entity

Given that the user definable fields in EBS & ESMobile applications are fully mapped, the only configuration we might need to do is customize the data entry screens for the needs of the specific client installation. (see section Data entry screens/ Master entity)

Generic task

Suppose we want to extend the elements in the header of a task of type Competition (international code: es.compt) so as to provide the user with the ability to enter: Comment & Meeting place. The required settings are:

EBS application

Add in the user definable fields of the task type the fields Comment-1 (Comment) & Category-1 (Meeting place) and create the list for the available options in Category-1.

ESMobile application

  • Add the elements Comment-1 & Category-1 in the header form (form: GenericTaskForm/es.compt/DetailView)

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="Label" Value="Comments" />

<Property Name="DataMember" Value="StringField1" />

<Property Name="Name" Value="StringField1" />

</Item>

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="Label" Value="Meeting place" />

<Property Name="DataMember" Value="fCategoryValue1GID" />

<Property Name="Name" Value="fCategoryValue1GID" />

<Property Name="Tag" Value="#GID#Code#ESTMTaskCategoryValue#[POP]

select v.GID,v.Code from ESTMTaskCategoryValue v

inner join ESTMTaskType tt on tt.GID=v.fTaskTypeGID

where v.DataField='ESTMTask.fCategoryValue1GID'

and tt.InternationalID='es.compt'" />

</Item>

  • Execute the initialization procedure from the devices so that they can get the values created in the table Category-1.

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

Since the default from_data type and to_data type already include all the user definable fields of the generic task (header & lines), no other customization is required.

Document

Suppose we want in the document header, to map the elements Text-5 & Table-5 of the EBS application to the elements Text-2 & Table-2 of the ESMobile application. The settings required are:

EBS application

  • to_data package

    • Change the filter for the document Header (ESFISalesDocument_.txt) to add the columns Text-5 & Table-5 while removing the columns Text-2 & Table-2. Pay extra attention so that the new columns get the same line number as the columns removed. Note that the easiest way to make this change is to use a tool for managing SQLLite databases, open the mobile database, note down the lines numbers of our columns (29 & 61 for Text-2 & Table-2 respectively) and then make sure that in the filter, the new columns Text-5 & Table-5 have these line numbers.

    • Change the filter for the Table2 of the document header (ESFIZDocumentHeadersTable_2.txt) to retrieve the data from the Table-5 of the document header. Note that, the easiest way to do this is to “Open” an esq file saved from Table-5.

  • from_data package

    • Modify the Match source-target fields to change the destination for fields Text-2 & Table-2 to fields Text-5 & Table-5.

ESMobile application

  • Add the elements Text-2 & Table-2 in the header form (e.g. GenericDocForm/1/DetailView)

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="Label" Value="Sting field 2" />

<Property Name="DataMember" Value="StringField2" />

<Property Name="Name" Value="StringField2" />

</Item>

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="Label" Value="Table 2" />

<Property Name="DataMember" Value="fADTableField2Code" />

<Property Name="Name" Value="fADTableField2Code" />

<Property Name="Tag" Value="#Code#Description#ESFIZDocumentHeadersTable#[POP]

select Code, Description, Code

from ESFIZDocumentHeadersTable where TableNumber = 2" />

</Item>

  • Execute the initialization procedure from the devices so that they can get the values created in the table Table-5.

Task types

Generic task (EditForm)

Suppose we want to implement a custom task type which will be used to record suggestions for improvement reported by customers. Besides the basic identification of an improvement request (Person - Address, Description & Date) we want to categorize each task for Group (Generic, Product, Services) and Priority (Critical, High, Medium, Low).

EBS application

Add a new task type of class “Generic task” (e.g. CS.IMP). In the task type configuration pay particular attention to:

  • Task groups. It is required to set the group Mobile_custom. This statement ensures that the custom task type IMP will be available in the ESMobile application environment.
  • Assignment rules. We must enable assignment to the resource role the user of the device has (e.g. SALES). This statement is required to sync the IMPs.
  • User definable fields. We define the fields we want to use for the task categorization “Group” & “Priority”. We create the list of the available options in each user definable field.

ESMobile application

Suppose we want the user to be able to create new improvement requests from the customer address environment and to view the already recorded IMPs in the general task list. Since the new task type is of class “Generic task (EditForm)”, the settings required are:

  1. Add a command (command: IMPSiteNewForm) for creating a new record.

<IMPSiteNewForm Assembly="Entersoft.Mobile.ESMerchandize"

Type="Entersoft.Mobile.ESMerchandize.NewTaskFromSiteCommand">

<Params>

<FormID Type="System.String" Value="GenericTaskForm/cs.imp" />

<TaskType Type="System.String" Value="cs.imp" />

<PostSaveCommand Type="System.String" Value="" />

<SaveMenu Type="System.String" Value="1,2,3" />

<CreateTaskItemSQL Type="System.String" Value="" />

<NoDetail Type="System.Boolean" Value="true" />

</Params>

</IMPSiteNewForm>

  1. Add a command (command: IMPEditForm) for viewing an existing record.

<IMPEditForm Assembly="Entersoft.Mobile.ESMerchandize"

Type="Entersoft.Mobile.ESMerchandize.EditTaskCommand">

<Params>

<FormID Type="System.String" Value="GenericTaskForm/cs.imp" />

<TaskType Type="System.String" Value="cs.imp" />

<HeaderRelatedFields Type="System.String" Value=""/>

<HeaderRequiredFields Type="System.String" Value="fAddressGID" />

<DetailRelatedFields Type="System.String" Value="" />

<DetailRequiredFields Type="System.String" Value="" />

<PostSaveCommand Type="System.String" Value="" />

<SaveMenu Type="System.String" Value="1,2,3" />

<CreateTaskItemSQL Type="System.String" Value="" />

<NoDetail Type="System.Boolean" Value="true" />

MOB-ImplementationGuide EN-image134.png</Params>

</IMPEditForm>

  1. Add a DetailView form for entry-view of the custom task type. Note here that, the form file should be saved in a subfolder in the area GenericTaskForm and pay attention so that its name equals the international code of the task type.

  2. Change the form of the address list (form: SiteListForm/AdvanceList) to add an action for a new record entry.

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Improvement" />

<Property Name="CellSource" Value="SiteGID" />

<Property Name="Name" Value="New#IMPSiteNewForm" />

<Property Name="DesignName" Value="#82" />

<Property Name="Selectable" Value="true" />

</Cell>

  1. Change the form task list to add the custom task type in the filter (command: MultiTaskListForm) and add in the form (MultiTaskListForm/AdvanceList & ExtraLayoutParams) an action for viewing an existing Improvement.

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Προβολη" />

<Property Name="CellSource" Value="TaskGID" />

<Property Name="Name" Value="CASE#...#...#TaskIntID#cs.imp#IMPEditForm#EditTask" />

<Property Name="DesignName" Value="#82" />

<Property Name="Selectable" Value="true" />

</Cell>

<?xml version="1.0" encoding="utf-8"?>

<layoutparameters>

<detailcommand>CASE#...#...#TaskIntID#cs.imp#IMPEditForm#EditTask</detailcommand>

<attachmentcommand>PhoneCommand#CreateMemo-Appointment</attachmentcommand>

<dropboxcommand>New#DropBox#fPersonGID</dropboxcommand>

<extraparams>...

<newactions>...

</layoutparameters>

  1. Execute the initialization procedure from the devices so that they can get the new task type.

Generic task (DocForm)

In the implementation process for a custom generic task with a header & lines, the same rules apply as those described above for the generic task. The differentiation is:

  • Definition of a form & actions for lines is also required. The files should be in a subfolder TaskItem in the form’s folder (e.g. GenericTaskForm/cs.imp/TaskItem)
  • In the add new command, the property NoDetail must be set to false. The same applies for the command of editing an existing record.

Database schema

Extended DS

Example/ Count

As mentioned above, there are some extra fields (fields starting with Ext) available to use in the lines area of the DocForm. A prerequisite to using these fields as line columns is to define the concept we want them to acquire. This definition is made in the files ESTMTaskItemExtDS.xml or ESFISalesDocLineItemExtDS.xml for a task line or a document line respectively.

e.g. to show in the column ExtNumericField1 of a count line, the field minimum order quantity

(a) Define the concept of this field ExtNumericField1for the merchandise line (command: ESTMTaskItemExtDS)

<CommandDef>

<ESTMTaskItemExtDS Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.EntityObjectExtDSCommand">

<Params>

<TableList Type="System.Collections.Hashtable">

<CustomerMerchandising Value="…" />

<SampleMerchandising Value="

i.MinimumOrderQty ExtNumericField1#

inner join ESFIItem i on i.GID = ESTMTaskItem.fItemGID" Type="System.String" />

</TableList>

<OnAddNewRelatedFields Type="System.String" Value=" " />

</Params>

</ESTMTaskItemExtDS>

</CommandDef>

(b) Add, in the item selection form, the required mapping (command: TaskItemMCHItemInvForm)

<CommandDef>

<TaskItemMCHItemInvForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvFormCreatorCommand">

<Params>

<BaseSelect Type="System.String" Value="

select …

i.MinimumOrderQty Assign_ExtNumericField1 from ESFIItem i …" />

</Params>

</TaskItemMCHItemInvForm>

</CommandDef>

(c) Add this column to the count line form (form: GenericTaskForm/es.mch/TaskItem/AdvancedList)

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="47,8,15,10" />

<Property Name="Alignment" Value="MiddleRight" />

<Property Name="CellSource" Value="ExtNumericField1" />

<Property Name="Name" Value="MinQrdQty" />

<Property Name="FormatString" Value="{0:#.##}" />

<Property Name="ForeColor" Value="orange" />

</Cell>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

Since version 2.70 of ESMobile application, the suggested method for assignments to line extra fields is via the Business rules tool (Action: 0-Assign)

Add table

Example/ Sample4ListForm

Suppose we want to extend the local database with a custom table for the Serial numbers (e.g. table CSMySerialNumber). Let’s also assume that updating the data in the custom table is only done with the initialization process.

Schema

  1. Change the file TablesOrdered.txt in the area ESFiles/SQLiteFiles/x.xx to declare the new table.
  2. Change the file InitializeSchema.txt in the area ESFiles/SQLiteFiles/x.xx to add the required sql script for creating the table. The way to declare each column of the table depends on the column type.
Type Size Not Null Collate Default
GID nvarchar 36 NOCASE
String nvarchar xxx NOCASE
Date nvarchar 36 NOCASE
Numeric real True BINARY 0.0
Flag smallint True BINARY 0

Besides declaring the columns wanted in the table, we must also declare a Primary and possible Foreign key. e.g. PRIMARY KEY ([GID]), FOREIGN KEY ([fItemGID]) REFERENCES [ESFIItem]([GID])

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

We advise to separate default – custom tables, to declare the custom tables in the end of the files and name them starting with the text CS.

Initialization

  1. Change the file Sync.txt in area ESFiles/SQLiteFiles/x.xx to declare the new table. Besides the table we must also declare the line number (index - 1) of the table columns regarding Date or Number. The declaration must have the form: $Date$Number that is, for our example CSMySerialNumber$[5]$[7].

MOB-ImplementationGuide EN-image135.png

  1. Change the to_data package and add the required filter to update the custom table. Pay attention to the name of the file produced which should be in the form: Table_.txt

So, the required setting for our example would be: CSMySerialNumber_.txt

  1. Execute the initialization procedure from the devices.

Sync/ to_

Suppose we want to have the ability to sync the contents of this custom table with the synchronization procedure as well.

  1. Make a copy of the default files SyncPullTablesOrdered.ini & SyncPullTablesOrdered.xml in the area CSConfig/Sync.
  2. Change the file SyncPullTablesOrdered.ini in the area CSConfig/Sync to declare the new table. Besides the table we must also declare the line number (index - 1) of the table columns regarding Date or Number and the column for the table primary key. The declaration must have the form: $Number$Date$PrimaryKey that is, for our example CSMySerialNumber$[7]$[5]$[0].
  3. Change the file SyncPullTablesOrdered.xml in the area CSConfig/Sync to declare the new table.

<?xml version="1.0" encoding="utf-8" ?>

<Tables>

<CSMySerialNumber>

<singular>

Serial number

</singular>

<plural>

Serial numbers

</plural>

<select>

Select GID, Code from CSMySerialNumber where GID in ('[values]')

</select>

</CSMySerialNumber>

</Tables>

  1. Issue a new custom version and execute the procedure Version check from the devices.

Add field

The process for extending an existing table of the local database is identical to that for adding a new custom table. So, if for example we want to extend the table “Item” to include the column “Alternative description” we would:

  1. Declare a custom table (e.g. CSMyItemEx) with the following columns:
Type Size Not Null Collate Default
GID nvarchar 36 NOCASE item GID
AlternativeDescription nvarchar xxx NOCASE

The column GID must be declared as the Primary key for the table CSMyItemEx. We must also define the association between the GID column of table CSMyItemEx and the GID column of table ESFIItem.

  1. Follow the steps described above in the section “Add table”

Business rules

Example/ Count

The Business rules tool is available to generic tasks and documents. Through Business rules tool the ability to implement several rules referring to checks & value assignments is provided. Business rule files should be stored in a given folder and should follow a predetermined naming. The following table lists the required, per form type, configuration:

Form type Folder File name
Generic task CSConfig\BusinessRules\Tasks

InternationalID_Rules.xml

the task type’s international code should be indicated by lowercase

e.g. es.mch_Rules.xml for task type “Count”

Document (DocForm) CSConfig\BusinessRules\Documents

DocumentType_Rules.xml

e.g. 1_Rules.xml for document type “Order”

The rule’s functionality is declared via properties Action, Activation & ScriptType, though the rule’s executing conditions are declared in section ExecutionConditions.

Action Activation ScriptType
Defines the rule type. For rules of 0-Assign type the action is defined in section OnChangeField, though for rules of 1-Check type is defined in section Validate. Defines the event that triggers the rule. The available options, per rule type, are: Defines the action type. The available options, per rule type, are:

0-Assign

<BusinessRule Title="…"

Entity=""

Action="0"

Activation=""

Inactive="">

<ExecutionConditions/>

<OnChangeField

Entity=""

Field=""

ScriptType=""

Script=""

AssignField=""/>

</BusinessRule>

0-OnChangeField

2-OnSave

1-OnAddLine

3-OnLoad

4-OnLoadDetail

7-OnAboutToSave

0-Formula

1-SQL

2-Constant value

1-Check

<BusinessRule Title="…"

Entity=""

Action="1"

Activation=""

Inactive="">

<ExecutionConditions/>

<Validate

Entity=""

Field=""

ScriptType=""

Script=""

Caption=""/>

</BusinessRule>

2-OnSave

5-OnEdit

available only for numeric fields & for measurement unit field

1-SQL

the query has to result to at least one record with value 0

3-Validation script

4-Regular expression

5-Duplicate line values check

6-Validate same values

7- Validate any values of

2-Execute

<BusinessRule Title="…"

Entity=""

Action="2"

Activation=""

Inactive="">

<ExecutionConditions/>

< Execute

Entity=""

ScriptType=""

Script=""

</BusinessRule>

6-AfterSave

1-SQL

8-Command

Script

When defining a script, references to entity fields should be of the form [TableName].[FieldName]

e.g. reference to task line’s field Quantity: “[ESTMTaskItem].[Quantity]”

Besides entity fields, the following functions are also available in a script: ESSUM, ESSUMWhere and ESCOUNTWhere. Note that, the script’s content is case sensitive.

ExecutionConditions
Defining an execution condition is optional and is implemented only by using the script type 3-Validation script.
ErrorType

The available levels of control are:

  • 0-Error. Display of a message and immediate cancelation of the action.
  • 1-Warning. Display of a message that gives the option of execution (button OK) or cancelation (button Cancel) of the action.
  • 2-Info. Display of a message and immediate execution of the action.
  • 3-Complex password. Display of a message that prohibits the execution of the action until the approval of a back office authorized user. Note that, the message must also contain the text {0}.

The ErrorType property is available only for on save (Activation: 2-OnSave) checks (Action: 1-Check)

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

Special attention should be paid to the selection of the “assigned to” fields. In case the selected field’s update is reserved by application’s assignment rules, application’s rules overcome the custom Business rules.

0-Assignment

Suppose that we want to automate data entry process in Count screen based on the following specifications:

  1. Subject: Either when adding a new count or when changing customer’s address, set text “Stock Count + Client Address” as the default Subject.

<BusinessRule Title="Assignment to Subject / 0-OnChangeField"

Entity="ESTMTask"

Activation="0"

Action="0"

Inactive="false">

<ExecutionConditions/>

<OnChangeField

Entity="ESTMTask"

Field="fAddressGID"

ScriptType="1"

Script="select

'Stock count ' || '- ' ||s.Address

from ESGOSites s

inner join ESGOPerson p on p.GID = s.fPersonGID

where s.GID = '[ESTMTask].[fAddressGID]'"

AssignField="Subject"/>

</BusinessRule>

  1. Quantity to order: Either when adding a new line or when changing the count quantity, the suggested quantify to order should be twice the count quantity.

<BusinessRule Title=" Assignment to OrderQuantity / 1-OnAddLine"

Entity="ESTMTask"

Activation="1"

Action="0"

Inactive="false">

<ExecutionConditions/>

<OnChangeField

Entity="ESTMTaskItem"

Field=""

ScriptType="0"

Script="[ESTMTaskItem].[Quantity]*2"

AssignField="OrderQuantity"/>

</BusinessRule>

<BusinessRule Title=" Assignment to OrderQuantity / 0-OnChangeField"

Entity="ESTMTaskItem"

Activation="0"

Action="0"

Inactive="false">

<ExecutionConditions/>

<OnChangeField

Entity="ESTMTaskItem"

Field="Quantity"

ScriptType="0"

Script="[ESTMTaskItem].[Quantity]*2"

AssignField="OrderQuantity"/>

</BusinessRule>

  1. Price: When adding a new line referring to an item of “SERVICE” group, if the quantify to order is less than 10 units the suggested price should equals the item’s price, otherwise should equals 80% of the item’s price.

<BusinessRule Title="Assignment to Price only for SERVICE Items/ 1-OnAddLine"

Entity="ESTMTask"

Activation="1"

Action="0"

Inactive="false">

<ExecutionConditions

ScriptType="3"

Script="'[ESTMTaskItem].[ItemGroupCode]' = 'SERVICE'" />

<OnChangeField

Entity="ESTMTaskItem"

Field=""

ScriptType="1"

Script="select

case when [OrderQuantity] &lt; 10 then i.Price else i.Price*0.8 end

from ESFIItem i where i.GID = '[ESTMTaskItem].[fItemGID]'"

AssignField="Price"/>

</BusinessRule>

Suppose also that we to extent the Count line’s screen in order to display the item’s discount. The requirement can be implemented by assigning the item’s discount in one of the extra line fields (e.g. ExtNumericField2)

<BusinessRule Title="Assignment to ExtNumericField2 / 1-OnAddLine, 4-OnLoadDetail"

Entity="ESTMTask"

Activation="1 4"

Action="0"

Inactive="false">

<ExecutionConditions/>

<OnChangeField

Entity="ESTMTaskItem"

Field=""

ScriptType="1"

Script=

"select i.Discount

from ESFIItem i where i.GID = '[ESTMTaskItem].[fItemGID]'"

AssignField="ExtNumericField2"/>

</BusinessRule>

MOB-ImplementationGuide EN-image128.png The assignment should be activated both when adding a new line (Activation: 1-OnAddLine) but also when loading the count screen (Activation: 4-OnLoadDetail). Given that both cases require the same definition, we just have to implement one rule that is activated in both events.

Suppose finally that we want to automate update process, when saving the Count task, based on the following specifications:

  1. Item’s total quantity: When saving the task, auto update of line’s Numeric Field-2 with the sum of quantity & quantity to order.

<BusinessRule Title="Assignment to Line-NumericField2 / 2-OnSave"

Entity="ESTMTask"

Activation="2"

Action="0"

Inactive="false">

<ExecutionConditions/>

<OnChangeField

Entity="ESTMTaskItem"

Field=""

ScriptType="0"

Script="[ESTMTaskItem].[Quantity]+[ESTMTaskItem].[OrderQuantity]"

AssignField="NumericField2"/>

</BusinessRule>

  1. Task’s total quantity: When saving the task, auto update of header’s Numeric Field-1 with the sum of quantity & quantity to order.

<BusinessRule Title="Assignment to Header-NumericField1 / 2-OnSave"

Entity="ESTMTask"

Activation="2"

Action="0"

Inactive="false">

<ExecutionConditions/>

<OnChangeField

Entity="ESTMTask"

Field=""

ScriptType="0"

Script="ESSum|[ESTMTaskItem].[NumericField2]|"

AssignField="NumericField1"/>

</BusinessRule>

1-Editing check

Supposed we want to prohibit editing in Count line quantity when flag “Exists” is activated.

<BusinessRule Title="Set Quantity as read only / 5-OnEdit"

Entity="ESTMTaskItem"

Activation="5"

Action="1"

Inactive="false">

<ExecutionConditions

ScriptType="3"

Script="[ESTMTaskItem].[FlagField1] = 1" />

<Validate

Entity=""

Field="Quantity"

ScriptType="3"

Script="'[ESTMTaskItem].[FlagField1]' = 1"

Caption="When the line is flagged as existing, changes to quantity are not allowed" />

</BusinessRule>

1-Registration check

Suppose that we want the Count task’s registration control based on the following specifications:

  1. SERVICE items: When saving the task, if there is not at least one item of “SERVICE” group, a relevant error message should be displayed.

<BusinessRule Title="Check of SERVICE Items / 2-OnSave"

Entity="ESTMTask"

Activation="2"

Action="1"

Inactive="false">

<ExecutionConditions/>

<Validate

Entity=""

Field=""

ScriptType="3"

Script="ESCountWhere|[ESTMTaskItem].[ItemGroupCode]|SERVICE| &gt; 0"

Caption="There should be at least one Service item"/>

</BusinessRule>

MOB-ImplementationGuide EN-image128.png ESCountWhere function counts the number of records having to a field (1st part) a specific value (2nd part). The function’s syntax should be as follows:
[TableName].[FieldName] | Value |
  1. Line’s comments: When saving the task, if there are lines without comments and flag “Exists” activated, a relevant error message should be displayed.

<BusinessRule Title="Check of line Comment / 2-OnSave"

Entity="ESTMTaskItem"

Activation="2"

Action="1"

Inactive="false">

<ExecutionConditions

ScriptType="3"

Script="[ESTMTaskItem].[FlagField1] = 1" />

<Validate

Entity="ESTMTaskItem"

Field=""

ScriptType="3"

Script="len('[ESTMTaskItem].[Comments]') &gt; 0"

Caption="When line is flagged as existing, line comments cannot be null"/>

</BusinessRule>

  1. Quantity to order: When saving the task, if all lines referring to the same item’s group do not have the same quantify to order, a relevant error message should be displayed.

<BusinessRule Title="Check differences in Order quantity / 2-OnSave"

Entity="ESTMTaskItem"

Activation="2"

Action="1"

Inactive="false">

<ExecutionConditions/>

<Validate

Entity=""

Field=""

ScriptType="6"

Script="ItemGroupCode,OrderQuantity"

Caption="All items of a group should have the same Order quantity."/>

</BusinessRule>

MOB-ImplementationGuide EN-image128.png Via script type 6-Validate same values, the ability to check that all lines with command value in one field (1st part) have also a common value in another field (2nd part). The function’s syntax should be as follows:
Field1Name , Field2Name
  1. Quantity to order: When saving & completing the task, if total quantity to order is less than total count quantity, a relevant error message should be displayed.

<BusinessRule Title="Check of total Order quantity / 2-OnSave"

Entity="ESTMTask"

Activation="2"

Action="1"

Inactive="false">

<ExecutionConditions

ScriptType="3"

Script="[ESTMTask].[State] = 2" />

<Validate

Entity=" "

Field=""

ScriptType="3"

Script="ESSum|[ESTMTaskItem].[OrderQuantity]| &gt;= ESSum|[ESTMTaskItem].[Quantity]|"

Caption="Total order quantity should be more than total count quantity"/>

</BusinessRule>

MOB-ImplementationGuide EN-image128.png ESSum function calculates the sum of a field’s value. The function’s syntax should be as follows:
[TableName].[FieldName] |
  1. Quantity to order: When saving & completing the task, if total quantity to order for items of “SERVICE” group is less than 20 units, a relevant error message should be displayed.

<BusinessRule Title="Check of total Order quantity for SERVICE Items / 2-OnSave"

Entity="ESTMTask"

Activation="2"

Action="1"

Inactive="false">

<ExecutionConditions

ScriptType="3"

Script="[ESTMTask].[State] = 2" />

<Validate

Entity=""

Field=""

ScriptType="3"

Script="ESSumWhere|[ESTMTaskItem].[OrderQuantity]|[ESTMTaskItem].[ItemGroupCode]|SERVICE| &gt; 20"

Caption="Total order quantity for Service items should be more than 20 units"/>

</BusinessRule>

MOB-ImplementationGuide EN-image128.png ESSumWhere function calculates the sum of a field’s value (1st part) for all records having to a specific field (2nd part) a specific value (3rd part). The function’s syntax should be as follows:
[TableName].[FieldName] | [TableName].[FieldName] | Value |
  1. SERVICE items with common data: When saving & completing the task, if there are lines referring to the same item of “SERVICE” group have at the same time the flag “Exists” activated, a relevant error message should be displayed.

<BusinessRule Title="Check for duplicate lines of SERVICE Items / 2-OnSave"

Entity="ESTMTaskItem"

Activation="2"

Action="1"

Inactive="false">

<ExecutionConditions

ScriptType="3"

Script="[ESTMTask].[State] = 2" />

<Validate

Entity=""

Field=""

ScriptType="5"

Script="fItemGID,FlagField1|ItemGroupCode|SERVICE|"

Caption="A line referring to the same Service item and the same exists characterization should appear only once"/>

</BusinessRule>

MOB-ImplementationGuide EN-image128.png Via script type 5-Duplicate line values, the ability to check the lines that have fields with common value is provided. The definition of the fields to check is implemented through a comma separated list (1st part) that can refer to maximum 4 fields. At the same time, the ability to reduce the lines involved is provided by declaring the field (2nd part) and the value (3rd part) consisting the reduction criteria. The function’s syntax should be as follows:
FieldName | Value
  1. Pending orders: When saving & completing the task, if the pending orders amount exceeds 500 €, a message requiring the approval of a back office authorized user should be displayed.

<BusinessRule Title="Check of customer's pending orders/ 2-OnSave"

Entity="ESTMTask"

MOB-ImplementationGuide EN-image136.pngActivation="2"

Action="1"

Inactive="false">

<ExecutionConditions/>

<Validate

Entity=""

Field=""

ScriptType="1"

Script=

"select

case when tax.PendingOrders &gt; 500 then 0 else 1 end

from ESFITradeAccount ta Inner Join ESFITradeAccountEx tax on tax.GID = ta.GID

where ta.GID = '[ESTMTask].[fTradeAccountGID]'"

Caption="The customer’s pending orders exceeds the permissible limit.

The action requires extra PIN.Please report code:{0}"

ErrorType="3"/>

</BusinessRule>

2-Execution

Suppose that we want, when saving & completing the Count task, the execution of a query that results to the deletion of all lines with zero count quantity & quantity to order.

<BusinessRule Title = "Delete zero lines/ 6-AfterSave"

Entity="ESTMTask"

Activation="6"

Action="2"

Inactive="false">

<ExecutionConditions

ScriptType="3"

Script="[ESTMTask].[State] = 2" />

<Execute

Entity="ESTMTask"

ScriptType="1"

Script="delete from ESTMTaskItem where fTaskGID = '[GID]' and Quantity = 0 and OrderQuantity = 0" />

</BusinessRule>

Ideas & Solutions

Work environment

Company website

Example/ SampleWebSite

The ability to switch from ESMobile application’s environment to the Company's Website is provided. To enable this feature, the following settings are required:

  • Create a WebViewCommand type command (e.g. command SampleWebSite). Declare, in UrlType property the relevant address and, in LocalFile property, whether the search of this address should be on the device or on the internet. Finally, via NavigationBarHidden property, the ability to display the website in full screen mode is provided. In this case, to exit the website screen and return to the application’s environment, a “triple clicking” on screen is required.

<SampleWebSite Assembly="Entersoft.Mobile.ESMobile" Type="Entersoft.Mobile.ESMobile.WebViewCommand">

<Params>

<Title Type="System.String" Value="Compamy website" />

<Url Type="System.String" Value="http://www.entersoft.gr" />

<SearchEnabled Type="System.Boolean" Value="false" />

<LocalFile Type="System.Boolean" Value="false" />

<NavigationBarHidden Type="System.Boolean" Value="true" />

</Params>

</SampleWebSite>

  • Add the command above as a new entry of the application’s main menu (form: Home).

<item type="listform" id="">

<title>Company website</title>

<command>SampleWebSite</command>

<PopToRoot>true</PopToRoot>

</item>

Nearby customers

Example/ SampleProspectCustomers

The ability to define, on a customization level, the preferable view of persons list is provided. To enable this feature, the following settings are required:

  • Create a ListFormCreatorCommand type command that defines the preferred persons list (e.g. command SampleProspectCustomers). Note that, using variables [LATITUDE], [LONGTITUDE] & [RADIUS] in the command’s filter, the person list can be altered based on the distance from the current location.

<SampleProspectCustomers Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.ListFormCreatorCommand">

<Params>

<Title Type="System.String" Value="Nearest prospect customers" />

<Filter Type="System.String"

Value="(ESDistance([LATITUDE],[LONGITUDE],s.Latitude,s.Longitude) &lt;= [RADIUS]) …." />

</Params>

</SampleProspectCustomers>

  • Define, in property NearestSiteListCommand of “Nearby customers” screen (e.g. command SampleNearestCustomers), the command referring to the preferred persons list.

<SampleNearestCustomers Assembly="Entersoft.Mobile.ESSalesForce"

Type="Entersoft.Mobile.ESSalesForce.NearestCustomersCommand">

<Params>

<NearestSiteListCommand Type="System.String" Value="SampleProspectCustomers" />

</Params>

</SampleNearestCustomers>

Online TRN check

Suppose we want to implement a tool that gives the mobile user the ability to check -via an online connection to the server- the existence of a customer, by using as identification key the TRN code. This tool can be implemented by an online report that has the TRN code as an inquired parameter (see section Informative screens/ Online report (HTML Report)/ With inquired parameters)

Competition attached documents

Based on product configuration, the ability to attach another application’s file is activated only on specific screens of the ESMobile application. Through the following settings, this feature can be extended furthermore.

MOB-ImplementationGuide EN-image110.png Suppose for example that we want to extent the attaching document feature in order to be available in the competitors list screen.
  • Alter the command related to the list of competitors (command: CompetitorListForm) and add to property ParamList the required for attachment record creation parameters.

<CompetitorListForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.ListFormCreatorCommand">

MOB-ImplementationGuide EN-image137.PNG<Params>

<FormID Type="System.String" Value="CompetitorListForm" />

<Title Type="System.String" Value="Competitors" />

<LoadDataOnOpenForm Type="System.Boolean" Value="true" />

<ParamList Type="System.Collections.Hashtable">

<EntityType Type="System.Int16" Value="6" />

<EntityGIDfield Type="System.String" Value="PersonGID" />

</ParamList>

</Params>

</CompetitorListForm>

Note that, the available values of EntityType parameter are: 5-Task, 3-Document, 6-Person, 7-Site & 10-Item. The declaration to parameter EntityGIDField refers to the screen-command “connecting” field.

  • Alter the command related to the list of forms (command: OpenUrlListForm) and add to the selection query the command above.

<OpenUrlListForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.ListFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="OpenUrlListForm" />

<Title Type="System.String" Value="Select entity to attach" />

<BaseSelect Type="System.String" Value="

select 'CustomerListForm' ID, 'Customers' Name

union

union

select 'CompetitorListForm' ID, 'COMPETETORS' Name" />

<OrderBy Type="System.String" Value="Name" />

</Params>

</OpenUrlListForm>

Multi-company operation

The ability to link the ESMobile applications of the same device with a different per device back office company is provided. The prerequisites for enabling this functionality are:

  • The device user should be entered as a distinct user-resource-salesperson in each company.
  • In IIS Server, one site per company should be created. These sites should have the option Multi company device enabled.
  • Using the properties ES_CENTRAL_COMPANY & ES_CENTRAL_BRANCH od data interchange tool, the necessary link of nodes to company-branch should be created.
MOB-ImplementationGuide EN-image110.png Suppose for example that we want to run ES-xVan & ES-SFA applications from the same device while linking them with companies 001 & 002 respectively.
  1. Create one site for company 001 and one for company 002 and activate in both sites the “Multi Company Device” option.

MOB-ImplementationGuide EN-image141.png

  1. Install applications ES-xVan & ES-SFA to the device. The activation of the option “Multi Company Device” in both sites causes the creation of one device record per application for which device ID is in the form of DeviceID_CompanyCode. Note that, in case a device record for the specific device already exists, deleting this record prior to this phase is a prerequisite.

MOB-ImplementationGuide EN-image149.png

MOB-ImplementationGuide EN-image153.png

  1. Link each node to the relevant company-branch. The linking is performed by declaring the relevant company-branch to ES_CENTRAL_COMPANY & ES_CENTRAL_BRANCH properties of each node and is a prerequisite for the proper operation of data synchronization process.

ListForm

Item Board

Example/ Sample1Board

The ability to switch to the Item's board screen is provided. To enable this feature, the following settings are required:

  • Create a BoardCreatorCommand type command (e.g. command Sample1Board). For further information regarding this command type see section Data entry screens/ Document (DocForm)/ Lines/ Item Board).
  • Add the command above as a button of items catalogue screen (form: InventoryItemListForm/ AdvancedList)

<RowTemplate>

<Property Name="Name" Value="SelectedRowTemplate" />

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Item Board" />

<Property Name="CellSource" Value="GID" />

<Property Name="Name" Value="Edit#Sample1Board" />

<Property Name="DesignName" Value="#82#22" />

<Property Name="Selectable" Value="true" />

</Cell>

</RowTemplate>

Item website

The ability to switch from ESMobile application’s environment to the Item's Website is provided. To enable this feature, the following settings are required:

  • Change the product file of ItemWeb command and define, in the UrlType property, the address of the preferable webpage. Parameter {0} is completed dynamically with the selected item’s code.

<ItemWeb Assembly="Entersoft.Mobile.ESMobile" Type="Entersoft.Mobile.ESMobile.WebViewCommand">

<Params>

<Title Type="System.String" Value="Item webpage" />

<Url Type="System.String" Value="http://MyURL/{0}.html" />

<SearchEnabled Type="System.Boolean" Value="false" />

<LocalFile Type="System.Boolean" Value="false" />

</Params>

</ItemWeb>

  • Add the command above as a button of items catalogue screen (form: InventoryItemListForm/ AdvancedList)

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Item webpage" />

<Property Name="ImageDefault" Value="" />

<Property Name="Bounds" Value="9,40,29,28" />

<Property Name="Name" Value="Edit#ItemWeb" />

<Property Name="CellSource" Value="Code" />

<Property Name="DesignName" Value="#82" />

<Property Name="Selectable" Value="true" />

</Cell>

Data bulk update

Example/ SamplePOPListForm

By the proper adjustment of RightButtonDefinition property, the ability of bulk updating the list’s select records is provided.

MOB-ImplementationGuide EN-image110.png Suppose for example that we want to implement a screen which will be used as a bulk update tool of Site’s field “Flag-1”.
  • Create an InvPopCommand type command (e.g. command SamplePOPListFormAction) that defines the preferable update action.

<SamplePOPListFormAction Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvPopCommand">

<Params>

<Parent Type="System.String" Value="" />

<Current Type="System.String" Value="" />

<Title Type="System.String" Value="Update" />

<BaseSelect Type="System.String" Value="select , 'OK'" />

<BaseUpdate Type="System.String" Value="

Update ESGOSites

set FlagField1 = case when FlagField1 = 1 then 0 else 1 end

where GID in ([CURRENT])" />

<Width Type="System.Int32" Value="250" />

<Height Type="System.Int32" Value="100" />

<RunSynchronously Type="System.Boolean" Value="True" />

<PostSaveCommand Type="System.String" Value="" />

</Params>

</SamplePOPListFormAction>

  • Change sites list screen command (e.g. command SamplePOPListForm) and set to RightButtonDefinition property the command above. The setting should be in the form: [POP]Command name.

<SamplePOPListForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.ListFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="Sample3ListForm" />

<Title Type="System.String" Value="Points of Sales" />

<BaseSelect Type="System.String" Value="

Select

s.GID GID, p.GID PersonGID, s.GID SiteGID,

From ESFITradeAccount ta

Inner Join ESGOPerson p on (ta.fPersonGID = p.GID)

Inner Join ESGOSites s on (s.fPersonGID = ta.fPersonGID)

Left Join ESFIZTradeAccountFamily zf on zf.Code = ta.fFamilyCode

Inner Join ESFITradeAccountEx tae on tae.GID = ta.GID "/>

<LeftButtonDefinition Type="System.String" Value="|" />

<MiddleButtonDefinition Type="System.String" Value="|" />

<RightButtonDefinition Type="System.String" Value="[POP]|SamplePOPListFormAction" />

</Params>

</SamplePOPListForm>

Note that, the column that refers to the unique identifier of a selected record (column with the alias GID) should be placed as the 1st column of the query.

Conditional info message

The ESMobile application provides the ability to conditionally display -on action execution- an info message. Additionally, by the proper adjustment of dashboard’s alertcommand property, the ability of displaying the info message while selecting a record is given.

1ST case: Action execution

Suppose for example that we want, when adding a new count to a customer that has open collection orders, a relevant info message to appear.

<MerchandisingSiteNewForm Assembly="Entersoft.Mobile.ESMerchandize"

Type="Entersoft.Mobile.ESMerchandize.NewTaskFromSiteCommand">

<Params>

<ShowMessage Type="System.String" Value="

select 'Have in mind that the customer has pending collection orders.'

from ESTMCollection where state=0 and fAddressGID ='[PARENT]'" />

</Params>

</MerchandisingSiteNewForm>

2ND case: Record selection

Suppose for example that we want the info message described above to also appear when focusing on a record of the points of sales list.

  • Create a AlertCommand type command (e.g. command SampleAlertCommand) to define the condition activating the info message display.

<SampleAlertCommand Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.AlertCommand">

<Params>

<Title Type="System.String" Value="Chech for pending collection orders" />

<ShowMessage Type="System.String" Value="

select 'Have in mind that the customer has pending collection orders.'

from ESTMCollection where state=0 and fAddressGID ='[CURRENT]'" />

</Params>

</SampleAlertCommand>

  • Add the command above as a button of points of sales list screen (form: SiteListForm/ AdvancedList)

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Samlpe-Alert message" />

<Property Name="CellSource" Value="SiteGID" />

<Property Name="Name" Value="Edit#SampleAlertCommand" />

<Property Name="DesignName" Value="#82#322" />

<Property Name="Selectable" Value="true" />

</Cell>

  • Declare the button above in alertcommand property of points of sales dashboard screen (form: SiteListForm/ ExtraLayoutParams)

<layoutparameters>

<detailcommand>Edit#SiteCTXEditForm</detailcommand>

<attachmentcommand>PhoneCommand#CreateMemo-Site</attachmentcommand>

<dropboxcommand>New#DropBox#PersonGID</dropboxcommand>

<alertcommand>Edit#SampleAlertCommand</alertcommand>

</layoutparameters>

Dynamic criteria & columns

Example/ SampleItemInvForm

The use of dynamic criteria is available both in defining the value of another criterion and in defining a column of the list. To enable this functionality, the following guidelines should be kept:

  • The definition of select query & search panel should be in stand-alone files.
  • The command’s properties Filter & Group By should be blank. The records filtering & grouping specs should be defined in the file describing the select query.
  • The command’s property OrderBy should be blank. In case of a unique sort criterion, the definition should be in the file describing the select query though in case of multiple criteria, the definition should be in command’s Sort By property.
  • All search panel criteria should have the Param property filled while at the same time, especially the criteria used for filtering the records of the list, they should be declared in the where clause of the select query.
MOB-ImplementationGuide EN-image110.png Suppose for example that we want to alter the filtering area of the quota MOB-ImplementationGuide EN-image47.pngItems selection list so that, while keeping the ability of searching via specific item fields, also adding to the list a “dynamic” column which is calculated based on the minimum order quantity and a user definable scaling factor.
  1. MOB-ImplementationGuide EN-image159.PNGDefine the criterion referring to the scaling factor
  • Create a search panel type file (e.g. SampleItemInvFormSP) and define a ColumnNames type criterion that has the Param property filled with a criterion name. Note that, in order the criterion to be defined as a number, setting Numeric property as true is a prerequisite.

<SampleItemInvFormSP Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.SearchPanelCreatorCommand">

<Params>

<SearchPanelFilter Type="System.Xml.XmlElement" Value="">

<element type="ColumnNames" minimumInput="" id="1" >

<column>Ratio</column>

<title>Qty ratio</title>

<numeric>true</numeric>

<default></default>

<param>pRatio</param>

</element>

</SearchPanelFilter>

</Params>

</SampleItemInvFormSP>

  • Create a query type file (e.g. SampleItemInvFormQR) for the definition of the preferable select query including a column referring to “Suggested quantity”.

<ESQuery

ID = "SampleItemInvFormQR"

SQL ="

Select

(i.GID) GID, max(i.Code) Code, max(i.Description) Description, max(i.Price) Price,…

@pRatio * max(i.MinimumOrderQty) SuggestedQty

From ESFIItem i

Left Join …

Where

(dt.CheckItemBalance &lt; 2 or itemBalance.Balance &gt; 0) …

Group By i.Description"

/>

  • Create a command referring to the items select list (e.g. SampleItemInvForm) taking attention to the guidelines described above.

<SampleItemInvForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="SampleItemInvForm" />

<Title Type="System.String" Value="Inventory items" />

<LoadDataOnOpenForm Type="System.Boolean" Value="true" />

<ShowThumbnails Type="System.Boolean" Value="false" />

<Filter Type="System.String" Value="" />

<FilterBy Type="System.String" Value="" />

<BaseSelect Type="System.String" Value="" />

<GroupBy Type="System.String" Value="" />

<ESQueryID Type="System.String" Value="SampleItemInvFormQR" />

<OrderBy Type="System.String" Value="" />

<SortBy Type="gr.entersoft.esmobile.SortBy">

<Definition>

<SortByField Caption="Description" ESCaptionID=""

Expression="i.Description asc" Default="true" />

<SortByField Caption="Code" ESCaptionID=""

Expression="i.Code asc" Default="false" />

</Definition>

</SortBy>

<SearchPanelID Type="System.String" Value="SampleItemInvFormSP" />

<CacheSearchPanel Type="System.Boolean" Value="false" />

<Current Type="System.String" Value="" />

</Params>

</SampleItemInvForm>

  1. Define the criteria referring to searching by item’s Code-Description & Category

  • Add to search panel a FieldChooser type criterion for item’s Code-Description fields and a DropDown type criterion for item’s Category field. All criteria should have the Param property filled with a relevant criterion name.

<SampleItemInvFormSP Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.SearchPanelCreatorCommand">

<Params>

<SearchPanelFilter Type="System.Xml.XmlElement" Value="">

<element type="FieldChooser" minimumInput="" id="1">

<column name="i.Code*" title="Code" param="pItemCode"/>

<column name="i.Description*" title="Description" param="pItemDescription"/>

</element>

<element type="DropDown" id="2">

<column>i.fItemCategoryCode</column>

<query>select Code,Description,Code from ESFIZItemCategory</query>

<default>All</default>

<title>Category</title>

<param>pItemCategory</param>

</element>

</SearchPanelFilter>

</Params>

</SampleItemInvFormSP>

  • Extent the query in order to activate records filtering by item’s Code-Description & Category. Note that, while adding a criterion in the where clause, the null value should be also considered.

<ESQuery

ID = "SampleItemInvFormQR"

SQL ="

Select

(i.GID) GID, max(i.Code) Code, max(i.Description) Description, max(i.Price) Price,…

@pRatio * max(i.MinimumOrderQty) SuggestedQty

From ESFIItem i

Left Join …

Where

and (i.Code like @pItemCode || '%' or @pItemCode is null)

and (i.Description like @pItemDescription || '%' or @pItemDescription is null)

and (i.fItemCategoryCode = @pItemCategory or @pItemCategory = or @pItemCategory is null)

Group By i.Description"

/>

  1. Define the criteria referring to searching by item’s last sold date.

  • Add to search panel a Datefield type criterion that has the Param property filled with a criterion name.

<SampleItemInvFormSP Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.SearchPanelCreatorCommand">

<Params>

<SearchPanelFilter Type="System.Xml.XmlElement" Value="">

<element type="Datefield" id="2">

<column>h.LastSoldDate</column>

<title>Period</title>

<param>pLastSoldDate</param>

</element>

</SearchPanelFilter>

</Params>

</SampleItemInvFormSP>

  • Extent the query in order to activate records filtering by item’s last sold date. Note that, in order filtering records based on period to be feasible, Datefield type criteria are always defined via two parameters whose name should be formed as @NameStart and @NameEnd.

<ESQuery

ID = "SampleItemInvFormQR"

SQL ="

Select

(i.GID) GID, max(i.Code) Code, max(i.Description) Description, max(i.Price) Price,…

@pRatio * max(i.MinimumOrderQty) SuggestedQty

From ESFIItem i

Left Join …

Where

and ((h.LastSoldDate &gt;= @pLastSoldDateStart and h.LastSoldDate &lt;= @pLastSoldDateEnd)

or (Coalesce(@pLastSoldDateStart,) = and Coalesce(@pLastSoldDateEnd,) = ))

Group By i.Description"/>

Suppose we want to further extent the filtering area of our example so that the “Factor” criterion changes dynamically based on the “Category” criterion value. The required settings are:

  • Extent the search panel in order to link “Category” and “Factor” criteria and to define their linking condition in the “Factor” criterion defaultQuery property.

<SampleItemInvFormSP Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.SearchPanelCreatorCommand">

<Params>

<SearchPanelFilter Type="System.Xml.XmlElement" Value="">

<element type="DropDown" id="2">

<column>i.fItemCategoryCode</column>

<query>select Code,Description,Code from ESFIZItemCategory</query>

<default>All</default>

<title>Category</title>

<param>pItemCategory</param>

<boundFields>4</boundFields>

</element>

<element type="ColumnNames" minimumInput="" id="4" >

<column>Ratio</column>

<title>Qty ratio</title>

<numeric>true</numeric>

<default></default>

<defaultQuery>

Select

case

when @pItemCategory = 'LOCAL' then 2

when @pItemCategory = 'IMPORTED' then 3

else 1 end

</defaultQuery>

<param>pRatio</param>

</element>

</SearchPanelFilter>

</Params>

</SampleItemInvFormSP>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

The screen types in which the use of dynamic criteria is available are: List (ListForm), Selection List (InvForm) and Local report (ReportForm).

Distance radius criterion

Example/ SampleSiteListForm

The ability to use the kilometer radius as one of the alternative filtering criteria of a list is provided. To enable this functionality, following the guidelines mentioned in section “Dynamic criteria & columns” is a prerequisite.

MOB-ImplementationGuide EN-image110.png Suppose for example that we want to extent the filtering area of point of sales list so that, while keeping the ability of searching via specific person & address fields, also adding the ability of searching via distance radius.
  • Create stand-alone search panel (e.g. SampleSiteListSP) & query (e.g. SampleSiteListQR) type files but also create a command referring to points of sales list (e.g. SampleSiteListForm) that follows the required syntax rules.
  • Add the “Radius” criterion to the search panel and fill all criteria’s Param property with the relevant criterion name.

<SampleSiteListSP Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.SearchPanelCreatorCommand">

<Params>

<SearchPanelFilter Type="System.Xml.XmlElement" Value="">

<element type="ColumnNames" minimumInput="" id="3" >

<column>Radius</column>

<title>Radius(km)</title>

<numeric>true</numeric>

<default>5.0</default>

<param>pRadius</param>

</element>

</SearchPanelFilter>

</Params>

</SampleSiteListSP>

  • Extent the query in order to define the “Radius” column and to make the necessary changes to the where clause of the select query. Note that, the “Radius” column syntax should be in the form:

ESDistance([LATITUDE],[LONGITUDE],s.Latitude,s.Longitude)

Sound search

For usability reasons, the ability to adjust search behavior by defining the preferable character matching algorithm is provided. To enable this feature, the following settings are required:

  • Define the matching rules that compose the algorithm in the SoundexMappings property of a command. Alternatively, through SoundexMappingsID property, the ability to define the matching rules in a stand-alone, reusable in all commands, file is provided.
  • Link algorithm and search criterion. Be aware that the content of field used as a search criterion "respects" the linked matching rules.
MOB-ImplementationGuide EN-image110.png Suppose for example that we want to extent the “Items catalogue” screen so that the result of items, when searching by description, to be the same regardless the use of uppercase-lower case or Greek-Latin characters. Note that, the specific search behavior is compatible with URLFriendlyEL function of EBS application.
  1. MOB-ImplementationGuide EN-image160.pngUpdate, via data interchange tool, a local database field (e.g. “String-1” field) with the URLFriendlyEL conversion result of the “Item’s Description” field.
  2. Define the matching rules that compose the URLFriendlyEL algorithm in a stand-alone file (e.g. SampleSoundex) and place the file to the CSConfig/Soundex folder.

<SampleSoundex Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.SoundexCreatorCommand">

<Params>

<SoundexMappings Type="System.Xml.XmlElement">

<soundex name="SampleSoundexEN" >

<replace sound="Α,α,Ά,ά" with="a"/>

<replace sound="Β,β" with="b"/>

<replace sound="Γ,γ" with="g"/>

<replace sound="Ω,ω,Ώ,ώ" with="o"/>

</soundex>

</SoundexMappings>

</Params>

</SampleSoundex>

  1. Add column “String-1” as a search criterion of “Items catalogue” screen and link this criterion with the matching algorithm implemented above.

<Item Assembly="Entersoft.Mobile.ESMobile" Type="Entersoft.Mobile.ESMobile.SearchPanelCreatorCommand">

<Params>

<SearchPanelFilter Type="System.Xml.XmlElement" Value="">

<element type="FieldChooser" minimumInput="" id="1">

<column name="i.StringField1*" title="StringField1" soundex="SampleSoundexEN" />

<column name="i.Code*" title="Code"/>

<column name="i.Description*" title="Descriptio"/>

</element>

</SearchPanelFilter>

</Params>

</Item>

  1. Link the command referring to “Items catalogue” screen with the algorithms file implemented above.

<InventoryItemListForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.ListFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="InventoryItemListForm" />

<Title Type="System.String" Value="Items catalogue" />

<SearchPanelID Type="System.String" Value="Item" />

<SoundexMappingsID Type="System.String" Value="SampleSoundex" />

</Params>

</InventoryItemListForm>

EditForm

Password protection

The ESMobile application provides the ability to define the preferable degree of protection when changing the value of a field, either on an EditForm screen or on the header form of a DocForm screen. The degree of protection is determined via the field’s Tag property:

  • For protection that requires approval of an authorized back-office user, set the text #RequiresExtraPin
  • For protection that requires a user password, set the text #RequiresPassword

The feature is available in all types of fields. Not that, especially in case of ItemLink field type, character # must not be included in Tag property definition.

<Item Type="Resco.Controls.DetailView.ItemNumeric">

<Property Name="Label" Value="Numeric field-1" />

<Property Name="DataMember" Value="NumericField1" />

<Property Name="Name" Value="NumericField1" />

<Property Name="Tag" Value="KL:num#RequiresExtraPin" />

</Item>

<Item Type="Resco.Controls.DetailView.ItemLink">

<Property Name="Label" Value="Address" />

<Property Name="DataMember" Value="fAddressGID" />

<Property Name="Name" Value="fAddressGID" />

<Property Name="Tag" Value="TaskSiteInvForm#GID#Address#ESGOSitesRequiresPassword" />

</Item>

Actions button

Example/ SampleEditFormActions

The ESMobile application provides the ability to add an actions button (button: MOB-ImplementationGuide EN-image123.png“Actions”) either on an EditForm screen or on the Questionnaire screen

MOB-ImplementationGuide EN-image110.png Suppose for example that we want to extent the Sales task & Questionnaire data entry screens so that the ability of executing the following actions (a) preview -via an online connection to the server- the customer’s ledger and (b) add a new count task.
  • Create a CommandSelector type command (e.g. command SampleEditFormActions) for the definition of preferable actions and their executing elements.

<SampleEditFormActions Assembly="Entersoft.Mobile.ESMobile" Type="Entersoft.Mobile.ESMobile.CommandSelector">

<Params>

<Title Type="System.String" Value="Actions" />

<CommandList Type="System.Collections.Hashtable">

<Command1 Value="Customer ledger#HtmlCommand_CustomerLedger|#82#322|Current=fTradeAccountGID"

Type="System.String" />

<Command2 Value="New Count#MerchandisingSiteNewForm|#82#322|Parent=fAddressGID"

Type="System.String" />

</CommandList>

</Params>

</SampleEditFormActions>

The action’s syntax should be in the form: Part-1|Part-2|Part-3 where:

Part-1: Action label#Command name
Part-2: Application-1 ID# Application-2 ID
Part-3:

Current=Screen-command “connecting” field, in case of an Edit type command

Parent=Screen-command “connecting” field, in case of an New type command

MOB-ImplementationGuide EN-image128.png In case of an EditForm type screen the “connecting” field must match to an element of the relevant DetailView form, while in case of a Questionnaire type screen the “connecting” field must correspond to one of the local database’s fields.

1ST case: Sales task

  • Add the elements fTradeAccountGID & fAddressGID to the DetailView referring to Sales task data entry screen (form: ToDoEditForm).

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="DataMember" Value="fTradeAccountGID" />

<Property Name="Visible" Value="False" />

<Property Name="Name" Value="fTradeAccountGID" />

</Item>

<Item Type="Resco.Controls.DetailView.ItemTextBox">

<Property Name="DataMember" Value="fAddressGID" />

<Property Name="Visible" Value="False" />

<Property Name="Name" Value="fAddressGID" />

</Item>

  • Define the actions button to the ActionsCommand property of the command referring to Sales task data entry screen (command: ToDoEditForm). Since, based on product configuration, the elements fTradeAccountGID & fAddressGID are not included in the command’s select query, we must add them.

<TodoEditForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.EditFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="ToDoEditForm" />

<Title Type="System.String" Value="Edit task" />

<Filter Type="System.String" Value="todo.GID = '[CURRENT]'" />

<BaseSelect Type="System.String" Value="

select todo.GID GID,…

todo.fTradeAccountGID fTradeAccountGID, todo.fAddressGID fAddressGID

from ESTMToDO todo

left join ESTMStatus st on st.TaskType = 'todo' and st.State = todo.State

left join ESTMTask t on t.GID = todo.GID" />

<ActionsCommand Type="System.String" Value="SampleEditFormActions|fTradeAccountGID|fAddressGID"/>

</Params>

</TodoEditForm>

2ND Case: Questionnaire

  • Define the actions button to the ActionsCommand property of the command referring to Questionnaire data entry screen (command: EditDataCollection).

<EditDataCollection Assembly="Entersoft.Mobile.ESMerchandize"

Type="Entersoft.Mobile.ESMerchandize.NewQuestionnaireCommand">

<Params>

<IsNew Type="System.Boolean" Value="false" />

<InternationalID Type="System.String" Value="es.rdc" />

<PhotoCommand Type="System.String" Value="PhotoNewFromSiteNoYammerForm" />

<SinglePage Type="System.Boolean" Value="true" />

<ActionsCommand Type="System.String" Value="SampleEditFormActions|fTradeAccountGID|fAddressGID"/>

</Params>

</EditDataCollection>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

In both cases, the ActionsCommand property must declare the actions button command name and the parameters referring to the screen-command “connecting” fields. The syntax of the property should be in the form: Command name|Parameter-1|Parameter-2|Parameter-n.

DocForm

Extra tabs

Example/ SampleDocTabPage, SampleTaskTabPage & Sample2TaskTabPage

By the proper adjustment of section Tabs of the Actions.xml file, the ESMobile application provides the ability to extent the task or document data entry screen with additional info that is displayed in the shape of extra tabs. The required configuration differs depending on the data entry screen’s entity and fields on which the additional info is based.

e.g. to add in order’s data entry screen a tab page with current customer’s counts

  • Create the relevant command (e.g. command SampleDocTabPage)

<SampleDocTabPage Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.ListFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="SampleTaskTabPage" />

<Title Type="System.String" Value="Counts" />

<LoadDataOnOpenForm Type="System.Boolean" Value="true" />

<Filter Type="System.String" Value="tt.InternationalID='ES.MCH' and

t.fTradeAccountGID = '[CURRENT]' "/>

<BaseSelect Type="System.String" Value="

Select

t.Code TaskCode, t.Subject, strftime('%d/%m/%Y',t.StartDate) StartDate, s.Address Address

From ESTMTask t

Inner Join ESGOSites s on s.GID = t.fAddressGID

Inner Join ESTMTaskType tt on tt.GID = t.FTaskTypeGID" />

</Params>

</SampleDocTabPage >

  • Add the command above in order’s data entry screen (form: GenericDocForm/1)

<ActionDefinition>

<Height>50</Height>

<Actions>...

<Tabs>

<DocTab Caption="Counts" Command="SampleDocTabPage" ESCaptionID=""/>

</Tabs>

</ActionDefinition>

e.g. to add in count’s data entry screen a tab page with current person’s counts

  • Create the relevant command (e.g. command SampleTaskTabPage)

<SampleTaskTabPage Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.ListFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="SampleTaskTabPage" />

<Title Type="System.String" Value="Counts" />

<LoadDataOnOpenForm Type="System.Boolean" Value="true" />

<Filter Type="System.String" Value="tt.InternationalID='ES.MCH' and

t.fPersonGID = '[CURRENT]' "/>

<BaseSelect Type="System.String" Value="

Select

t.Code TaskCode, t.Subject, strftime('%d/%m/%Y',t.StartDate) StartDate, s.Address Address

From ESTMTask t

Inner Join ESGOSites s on s.GID = t.fAddressGID

Inner Join ESTMTaskType tt on tt.GID = t.FTaskTypeGID" />

</Params>

</SampleTaskTabPage>

  • Add the command above in count’s data entry screen (form: GenericTaskForm/es.mch)

<ActionDefinition>

<Height>50</Height>

<Actions>...

<Tabs>

<DocTab Caption="Counts" Command="SampleTaskTabPage" ESCaptionID=""/>

</Tabs>

</ActionDefinition>

e.g. to add in count’s data entry screen a tab page with current address’s counts

  • Create the relevant command (e.g. command Sample2TaskTabPage)

<Sample2TaskTabPage Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.ListFormCreatorCommand">

<Params>

<FormID Type="System.String" Value="SampleTaskTabPage" />

<Title Type="System.String" Value="Counts-POS" />

<LoadDataOnOpenForm Type="System.Boolean" Value="true" />

<Filter Type="System.String" Value="tt.InternationalID='ES.MCH' and

t.fPersonGID = '[PARENT]' and t.fAddressGID = '[CURRENT]' "/>

<BaseSelect Type="System.String" Value="

Select

t.Code TaskCode, t.Subject, strftime('%d/%m/%Y',t.StartDate) StartDate, s.Address Address

From ESTMTask t

Inner Join ESGOSites s on s.GID = t.fAddressGID

Inner Join ESTMTaskType tt on tt.GID = t.FTaskTypeGID" />

</Params>

</Sample2TaskTabPage>

  • Add the command above in count’s data entry screen (form: GenericTaskForm/es.mch)

<ActionDefinition>

<Actions>...

<Tabs>

<DocTab Caption="Counts-POS" Command="Sample2TaskTabPage" ESCaptionID="">

<ParamList>

<Param Name = "Parent" DataSource = "fPersonGID" />

<Param Name = "Current" DataSource = "fAddressGID" />

</ParamList>

</DocTab>

</Tabs>

</ActionDefinition>

Note that, this extra tab page is implemented in a way that makes it compatible for both task & document data entry screens.

MOB-ImplementationGuide EN-image161.PNG

Actions on selected line

The ability to extent the action toolbar with actions made to fit the needs of the specific client installation is provided. These actions are always called by the selected task line or document line to display a data entry screen or an online report. To implement this, we have to change the Actions.xml of the DocForm screen and in the Actions section, add the following:

e.g. display the data entry screen for the item of the selected document line

<Actions>

<ActionButton ImagePath="Images/LineMore.png"

Name="Command" Command="Edit#ItemDetailForm"

DataSource="ESFISalesDocLineItem.fItemGID"

Width="30" Height="30" />

</Actions>

e.g. display an online report “Sales History” for the item of the selected document line

<Actions>

<ActionButton ImagePath="Images/LineMore.png"

Name="Command"

Command="Html_ESSalesPerItem" Width="30" Height="30">

<ParamList>

<Param DataSource="ESFISalesDocLineItem.fItemGID" Name="ISUDGID" Value=""/>

</ParamList>

</ActionButton>

</Actions>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

  • In case we want to add this functionality in a generic task line, the property DataSource should refer to table ESTMTaskItem.

  • There is no restriction for the number of parameters used in an online report.

Data sending button

The ESMobile application provides the ability to extent the action toolbar of the DocForm screen with buttons that results to direct execution of a generic command. To enable this feature, the relevant command must be added in section Actions of Actions.xml file.

e.g. for direct execution of data sending process via a button in sales order screen

<Actions>

<ActionButton ImagePath="Images/LineMore.png" Name="Command" Command="SyncPush" Width="30" Height="30"/>

</Actions>

Photo task button

The ability to add a new Photo task is provided either form the dashboard screen or from data entry screen of a selected task. To enable this feature, the following settings are required:

  • Create a NewTaskCommand type command (e.g. command SamplePhotoTask) that defines the elements required to generate a photo task.

<SamplePhotoTask Assembly="Entersoft.Mobile.ESMobile" Type="Entersoft.Mobile.ESMobile.NewTaskCommand">

<Params>

<FormID Type="System.String" Value="PhotoNewForm" />

<Title Type="System.String" Value="Info" />

<TaskType Type="System.String" Value="es.photo" />

<CreateHeaderQuery Type="System.String" Value="

Select

p.GID Assign_fPersonGID, ta.GID Assign_fTradeAccountGID,

s.GID Assign_fAddressGID, s.fContactPersonGID Assign_fContactPersonGID,

'[PARENT]' Assign_fParentTaskGID

From ESTMTask t

Inner Join ESGOPerson p on p.GID = t.fPersonGID

Inner Join ESGOSites s on s.GID = t.fAddressGID

Left Join ESFITradeAccount ta on ta.fPersonGID = p.GID

Where t.GID = '[PARENT]'" />

<NoDetail Type="System.Boolean" Value="true" />

</Params>

</SamplePhotoTask>

  • Create a PhotoCommand type command (e.g. command SamplePhotoForm) to activate the photo capture screen.

<SamplePhotoForm Assembly="Entersoft.Mobile.ESMobile" Type="Entersoft.Mobile.ESMobile.PhotoCommand">

<Params>

<TaskCommand Type="System.String" Value="SamplePhotoTask" />

<Title Type="System.String" Value="Photo" />

<AutoClose Type="System.Boolean" Value="true" />

<Width Type="System.Int32" Value="500" />

<SocialCommand Type="System.String" Value="PostPhotoToYammer" />

</Params>

</SamplePhotoForm>

  • Add the SamplePhotoForm command as a button of the tasks list form

<RowTemplate>...

<RowTemplate>

<Property Name="Name" Value="SelectedRowTemplate" />

Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Sample-Auto task" />

<Property Name="CellSource" Value="TaskGID" />

<Property Name="Name" Value="New#SamplePhotoForm" />

<Property Name="DesignName" Value="#82#322" />

<Property Name="Selectable" Value="true" />

</Cell>

</RowTemplate>

  • Alternatively, the ability to implement the SamplePhotoForm command as a toolbar action of the task’s data entry screen (e.g. form GenericTaskForm/es.mch) is also provided.

<Actions>

<ActionButton ImagePath="Images/ios7/camera.png" Name="Command" Command="NEW#SamplePhotoForm"

DataSource="ESTMTask.GID" Width="30" Height="30"/>

</Actions>

Group lines

The ESMobile application provides the ability to use a field from a related entity -that means a field not listed in the line’s available fields- as the gouping factor of task or document lines.

MOB-ImplementationGuide EN-image110.png Suppose for example that we want to use the field “Group description” as the order lines grouping factor. Since the specific field is not one of the line’s available fields, its content must be assigned to one of the extra line fields. This assignment can be implemented either by extending the items selection list or -since version 2.70 of ESMobile application- via Business rules tool.

1st option: assignment via items selection list

  • Extend items selection list (command: ItemInvForm) in order to assign “Group description” field to “ExtStringField1” column. Note that, the extension must be implemented in all action buttons used as items selection list (photo-catalog, basket, sales orders templates etc.)

<ItemInvForm Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.InvFormCreatorCommand">

<Params>

<BaseSelect Type="System.String" Value="

Select …,

max (IG.Description) Assign_ExtStringField1

from ESFIItem i Left Join ESFIZItemGroup IG on IG.Code=i.fItemGroupCode"/>

</Params>

</ItemInvForm>

  • Declare, in command ESFISalesDocLineItemExtDS, the definition of ExtStringField1 column

<ESFISalesDocLineItemExtDS Assembly="Entersoft.Mobile.ESMobile" Type="Entersoft.Mobile.ESMobile.EntityObjectExtDSCommand">

<Params>

<TableList Type="System.Collections.Hashtable">

<CustomDocLine Value="IG.Description ExtStringField1#

Inner Join ESFIItem I on I.GID=ESFISalesDocLineItem.fItemGID

Left Join ESFIZItemGroup IG on IG.Code=I.fItemGroupCode"

Type="System.String"/>

</TableList>

<OnAddNewRelatedFields Type="System.String" Value=" "/>

</Params>

</ESFISalesDocLineItemExtDS>

  • Declare, in mobile parameter Doc_GroupField, column ExtStringField1 as the lines’ grouping factor and activate the functionality of extending document lines table by setting mobile parameter ESFISalesDocLineItemExtended as true.

2nd option: assignment via Business rules

  • Extend order’s Business rules (file: 1_Rules) in order to assign “Group description” field to “GroupField” column. The assignment should be activated both when adding a new line (Activation: 1-OnAddLine) but also when loading the order screen (Activation: 4-OnLoadDetail). Note that, the extension must be implemented in all document types (0-Quotation, 1-Order etc.)

<BusinessRule Title="Assign to GroupField / 1-OnAddLine"

Entity="ESFISalesDocument"

Activation="1"

Action="0"

Inactive="false">

<ExecutionConditions/>

<OnChangeField

Entity="ESFISalesDocLineItem"

Field=""

ScriptType="1"

Script= "

Select IG.Description

From ESFIItem i

Inner Join ESFIZItemGroup ig on ig.Code=i.fItemGroupCode

Where i.GID = '[ESFISalesDocLineItem].[fItemGID]' "

AssignField="GroupField"/>

</BusinessRule>

<BusinessRule Title="Assign to GroupField / 4-OnLoadDetail"

Entity="ESFISalesDocument"

Activation="4"

Action="0"

Inactive="false">

<ExecutionConditions/>

<OnChangeField

Entity="ESFISalesDocLineItem"

Field=""

ScriptType="1"

Script= "

Select IG.Description

From ESFIItem i

Inner Join ESFIZItemGroup ig on ig.Code=i.fItemGroupCode

Where i.GID = '[ESFISalesDocLineItem].[fItemGID]' "

AssignField="GroupField"/>

</BusinessRule>

  • Declare, in mobile parameter Doc_GroupField, column GroupField as the lines’ grouping factor

Sort lines

The sort action interprets all fields as text fields. In order sorting by a numeric field to be accurate, we must use one of the extra line fields for “converting” a number to text.

MOB-ImplementationGuide EN-image110.png Suppose for example that that we want to use the field “% Discount-2” as the order lines sorting factor.
  • Extend order’s Business rules (file: 1_Rules) in order to convert numeric field “% Discount-2” to a 6 characters text (considering number 100.00 as the maximum % Discount) and assign the generated text in one of the extra line fields (e.g. ExtStringField2). The conversion-assignment should be activated both when adding & editing a line (Activation: 1-OnAddLine & 0-OnChangeField respectively) but also when loading the order screen (Activation: 4-OnLoadDetail).

<BusinessRule Title="Assign to ExtStringField2 / 1-OnAddLine"

Entity="ESFISalesDocument"

Activation="1"

Action="0"

Inactive="false">

<ExecutionConditions/>

<OnChangeField

Entity="ESFISalesDocLineItem"

Field=""

ScriptType="1"

Script= "

Select

substr('000000'||cast(printf('%.2f',[ESFISalesDocLineItem].[Disc2]) as varchar),length('000000'||cast(printf('%.2f',[ESFISalesDocLineItem].[Disc2]) as varchar))-5,6)"

AssignField="ExtStringField2"/>

</BusinessRule>

<BusinessRule Title="Assign to ExtStringField2 / 0-OnChangeField"

Entity="ESFISalesDocLineItem"

Activation="0"

Action="0"

Inactive="false">

<ExecutionConditions/>

<OnChangeField

Entity="ESFISalesDocLineItem"

Field="Disc2"

ScriptType="1"

Script= "

Select

substr('000000'||cast(printf('%.2f',[ESFISalesDocLineItem].[Disc2]) as varchar),length('000000'||cast(printf('%.2f',[ESFISalesDocLineItem].[Disc2]) as varchar))-5,6)"

AssignField="ExtStringField2"/>

</BusinessRule>

<BusinessRule Title="Assign to ExtStringField2 / 4-OnLoadDetail"

Entity="ESFISalesDocument"

Activation="4"

Action="0"

Inactive="false">

<ExecutionConditions/>

<OnChangeField

Entity="ESFISalesDocLineItem"

Field=""

ScriptType="1"

Script= "

Select

substr('000000'||cast(printf('%.2f',[ESFISalesDocLineItem].[Disc2]) as varchar),length('000000'||cast(printf('%.2f',[ESFISalesDocLineItem].[Disc2]) as varchar))-5,6)"

AssignField="ExtStringField2"/>

</BusinessRule>

  • Define column ExtStringField2 as one of the order lines alternative sorting factors (file: Actions)

<ActionDefinition>

<Actions>...

<Tabs>...

<ToolbarActions>...

<ToolbarOnlineActions>...

<SortBy Type="gr.entersoft.esmobile.SortBy">

<Definition>

<SortByField Caption="Disc 3-Converted" ESCaptionID = ""

Expression="GroupField, ExtStringField2 desc" Default="false" />

</Definition>

</SortBy>

MOB-ImplementationGuide EN-image165.PNG</ActionDefinition>

Column conditional formatting

The ability of conditional formatting the elements of the “Contents” DocForm area, is provided. The formatting-related settings are defined in task’s line AdvancedList form. To enable this feature, the following settings are required:

  • Add a Binding section to define the condition’s name & rule.
  • Activate the condition on a column or row level. Especially for columns, the setting of BindType property is required while the available options are: label, string, numeric, numericpad, datetime, date and time. Note that, to define a string or a numeric column with numeric keyboard as not editable, the use of option label is a prerequisite.
MOB-ImplementationGuide EN-image110.png Suppose for example that we want Count’s task type contents area to be formatted based on the following specifications.
  1. Altering the row’s BackColor on even-odd lines.

<Binding name="AltRow" type="string">

<Filter type="IsOddIndex" result="f6f6f6" />

<Filter type="AlwaysTrue" result="ffffff" />

</Binding>

<RowTemplate>

<Property Name="Name" Value="RowTemplate" />

<Property Name="Height" Value="24" />

<Property Name="BackColor" Value="{Binding AltRow}" />

</RowTemplate>

  1. Altering the ForeColor of columns «Quantity» & «Price» based on the value of the count quantity.

<Binding name="AlterForeColor" type="string">

<Filter type="LessThan" column="Quantity" value="3" result="FF00FF" />

<Filter type="GreaterThan" column="Quantity" value="10" result="FF6347" />

<Filter type="AlwaysTrue" result="006400" />

</Binding>

<RowTemplate>

<Property Name="Name" Value="RowTemplate" />

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Name" Value="Quantity" />

<Property Name="ForeColor" Value="{Binding AlterForeColor}" />

<Property Name="BindType" Value="label" />

</Cell>

<Property Name="Height" Value="24" />

<Property Name="BackColor" Value="{Binding AltRow}" />

</RowTemplate>

Custom numeric keyboard

To facilitate the Count task editing process, a custom numeric keyboard which contains buttons for easily moving to next-previous column or line, has been implemented. To enable this feature, the lines AdvancedList file should be extended with the declaration of the "NumericDpad" keyboard (property: KeyboardID) and the preferable columns sequence (property: TabIndex). Note that, in order the custom numeric keyboard to be activated, the Selectable property must be set as true.

MOB-ImplementationGuide EN-image166.PNGe.g. to enable the custom keyboard in count line’s columns counted quantity & quantity to order

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="CellSource" Value="Quantity" />

<Property Name="Name" Value="Quantity" />

<Property Name="DesignName" Value="Counted Qty" />

<Property Name="Selectable" Value="true" />

<Property Name="KeyboardID" Value=" NumericDpad" />

<Property Name="TabIndex" Value="1" />

</Cell>

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="CellSource" Value="OrderQuantity" />

<Property Name="Name" Value="OrderQuantity" />

<Property Name="DesignName" Value="Qty to Order" />

<Property Name="Selectable" Value="true" />

<Property Name="KeyboardID" Value=" NumericDpad" />

<Property Name="TabIndex" Value="2" />

</Cell>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that…

The activation of the custom keyboard is only available on Generic Tasks (DocForm) screens.

MOB-ImplementationGuide EN-image167.PNGSelect from catalogue items

The ability to enter a document line by using the catalog item list is provided. To enable this feature, mobile parameter Doc_UseCatalogueItems should be set as 1-Yes. This way, by using the button MOB-ImplementationGuide EN-image42.png “Item selection list”, first a Catalogue item selection list appears and then by focusing on one of them the list of associated inventory items appears.

Lot selection

The ESMobile application provides the ability to extent the action toolbar of the DocForm screen with buttons that results to the display -via an online connection to the server- of the selected line item’s lots. To enable this feature, the following settings are required:

  • MOB-ImplementationGuide EN-image171.PNGCreate an EBS view on the entity “Lot” with:
  • 1 input parameter. This parameter is supplied with the content of a specific document line field.

  • 2 visible columns. The 1st column’s value is saved in a document line field, while the 2nd column’s value appears in the lot selection screen.

  • Create a new OnLineScrollerChooserCommand command (e.g. command LotChooser). In properties ParamName & SourceField the input parameter’s name & the document line field that supplies the input parameter are defined respectively, while in property AssignField the document line field to save the selected lot is given (e.g. StringField1).

<LotChooser Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.OnLineScrollerChooserCommand">

<Params>

<ParamName Type="System.String" Value="ItemCode" />

<SourceField Type="System.String" Value="ItemCode" />

<AssignField Type="System.String" Value="StringField1" />

<ScrollerGroup Type="System.String" Value="ESTMPDASales" />

<ScrollerID Type="System.String" Value="LotChooser" />

</Params>

</LotChooser>

Bulk line editing

The ability to bulk update document’s lines numeric fields, is provided. To enable this feature, the command BatchUpdate must be added in section ToolbarActions of document’s screen Actions.xml file.

e.g. to bulk update the quantity of already added document lines

<ToolbarActions>

<DocToolbarAction Caption="Bulk edit quantity" Command="BatchUpdate#Quantity" ESCaptionID=""/>

</ToolbarActions>

Discount value allocation

The ESMobile application provides the ability to bulk update document’s lines discount with an amount resulting from the allocation of total discount declared by the user. To enable this feature, the command AllocateDiscount must be added in section ToolbarActions of document’s screen Actions.xml file.

e.g. for bulk update the relevant amount in document’s line field “Discount value-1”.

<ToolbarActions>

<DocToolbarAction Caption="Discount allocation" Command="AllocateDiscount#Disc1" ESCaptionID=""/>

</ToolbarActions>

Line total discount %

The ability to display total discount % of a document line is provided. The percentage is calculated from the three individual discount fields of the line with the following calculation: Total discount value / (Quantity * Price). To display this information we have to add in the AdvancedList file for the document lines, a new element of type TextCell and in the property Name set the value DiscountPercent.

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="TextFont" Value="Tahoma, 8pt, style=Bold" />

<Property Name="Bounds" Value="95,10,20,16" />

<Property Name="CellSource" Value="DiscountPercent" />

<Property Name="Name" Value="DiscountPercent" />

<Property Name="Alignment" Value="Left" />

<Property Name="FormatString" Value="{0:0.##\%}" />

</Cell>

Gift line type

The ESMobile application provides the ability toMOB-ImplementationGuide EN-image175.PNG implement an action that is called by the selected document line to insert an exact copy of the selected line, with quantity 1 in main item measurement unit and 100% discount. At the same time, the ability to label these lines as “gift” with an appropriate icon is given. To implement this action, we have to change the AdvancedList file of the document lines.

  • Add, in the RowTemplate for the selected record, an element for type ButtonCell that in the property Name will have the value NewByCopyGiftButton.

<RowTemplate>

<Property Name="Name" Value="SelectedRowTemplate" />

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Bounds" Value="200,44,40,40" />

<Property Name="ImageDefault" Value="iVBORw0KGg..." />

<Property Name="Name" Value="NewByCopyGiftButton" />

<Property Name="Selectable" Value="true" />

<Property Name="CellSource" Value="&quot;-1&quot;" />

</Cell>

</RowTemplate>

  • To label these lines as gifts with an icon: we add one more element of type ButtonCell that in the property Name will have the value ConditionalButton and in the property CellSource the value IsGift. Finally, in the property TrueImageFile we define the area of the icon we want to use.

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="TrueImageFile" Value="CSmages/Gift.png" />

<Property Name="CellSource" Value="IsGift" />

<Property Name="Bounds" Value="1,1,10,32" />

<Property Name="Name" Value="ConditionalButton" />

</Cell>

C:\Users\smp\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\5ERD3D13\MCj04421290000[1].png Note that...

The field in which the discount will be applied is defined in the mobile parameter Doc_GiftDiscount_Field. Based on product configuration, the discount is placed in the field Discount %-3.

Balance limit excess

MOB-ImplementationGuide EN-image176.PNGThe document lines with balance limit excess can be marked by showing a relevant message. To enable this feature, the following addition, in document line AdvancedList file, is required:

<Cell Type="Resco.Controls.AdvancedList.TextCell">

<Property Name="Bounds" Value="23,25,180,16" />

<Property Name="CellSource"

Value="ItemBalanceErrorMessage" />

<Property Name="Name" Value="ItemBalanceErrorMessage" />

<Property Name="Alignment" Value="Left" />

<Property Name="DesignName" Value="TextCell2296" />

<Property Name="ForeColor" Value="red" />

</Cell>

Alter collection type button

The ESMobile application provides the ability to extent, the action toolbar of the Collection screen with a button that results to type altering of an existing collection line. To enable this feature, the relevant command must be added in section Actions of collection’s screen Actions.xml file.

e.g. for a button that sets the line type to “Transfer”

<Actions>

<ActionButton ImagePath="…" Name="ConvertLineButton#ColPayTransferCode" Width="30" Height="30"/>

</Actions>

Task auto generation

Example/ SampleAutoTask

The ESMobile application provides the ability to implement a command that results to the auto generation of a task based on, relevant to the issuing customer, user definable data.

MOB-ImplementationGuide EN-image110.png Suppose for example that we want the auto generation of a Count task which includes all items that current year’s sales exceeds the 5 units updating at the same time the “Quantity to order” with the relevant sales quantity.
  • Create a NewTaskCommand type command (e.g. command SampleAutoTask) that defines the elements required to generate a Count task.

<SampleAutoTask Assembly="Entersoft.Mobile.ESMerchandize"

Type="Entersoft.Mobile.ESMerchandize.NewTaskCommand">

<Params>

<TaskType Type="System.String" Value="es.mch" />

<CreateHeaderQuery Type="System.String" Value="

Select

p.GID Assign_fPersonGID,

ta.GID Assign_fTradeAccountGID, s.GID Assign_fAddressGID,

s.fContactPersonGID Assign_fContactPersonGID,

'MCH for year -' || strftime('%Y', 'now') Assign_StringField1

From ESGOPerson p

Inner Join ESGOSites s on (s.fPersonGID = p.GID and s.IsMainAddress = 1)

Left Join ESFITradeAccount ta on ta.fPersonGID = p.GID

Where p.GID = '[PARENT]'" />

<CreateLinesQuery Type="System.String" Value="

Select

i.GID Assign_fItemGID, 1 Quantity, fItemMUGID,

i.Code Assign_ItemCode, i.Description Assign_ItemDescription,

sum(pr.Quantity) Assign_OrderQuantity

From ESFIPeriodics pr

Inner Join ESFITradeAccount ta on (ta.GID = pr.fTradeAccountGID)

Inner Join ESFIItem i on (i.GID = pr.fItemGID)

Inner Join ESGOFiscalPeriod fp on (fp.GID = pr.fFiscalPeriodGID)

Where

fp.StartDate &gt;= date('now','-12 month')

and ta.fPersonGID = '[PARENT]'

and pr.Quantity &gt;= 5

Group by i.GID"/>

<PostSaveCommand Type="System.String" Value="" />

<SaveMenu Type="System.String" Value="1,2,3" />

</Params>

</SampleAutoTask>

  • Add the command above as a button to be available on a selected customer (form: Sample3ListForm)

<RowTemplate>...

<RowTemplate>

<Property Name="Name" Value="SelectedRowTemplate" />

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Sample-Auto task" />

<Property Name="CellSource" Value="PersonGID" />

<Property Name="Name" Value="New#SampleAutoTask" />

<Property Name="DesignName" Value="#82#322" />

<Property Name="Selectable" Value="true" />

</Cell>

</RowTemplate>

Document auto generation

Example/ SampleAutoDocument

The ESMobile application provides the ability to implement a command that results to the auto generation of a document based on, relevant to the issuing customer, user definable data.

MOB-ImplementationGuide EN-image110.png Suppose for example that we want the auto generation of 9-Gift document which, for each item that current year’s sales exceeds the 5 units, gives 1 unit as a gift.
  1. Create a NewDocument type command (command: SampleAutoDocument) that defines the elements required to generate a document.

<SampleAutoDocument Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.NewDocumentCommand">

<Params>

<CreateHeaderQuery Type="System.String" Value="

Select ta.GID Assign_fTradeAccountGID,

s.GID Assign_fAddressGID,s.fContactPersonGID Assign_fContactPersonGID,

'Gifts document for year -' || strftime('%Y', 'now') Assign_StringField1

From ESFITradeAccount ta

Inner Join ESGOSites s on (s.fPersonGID = ta.fPersonGID and s.IsMainAddress = 1)

Where ta.GID = '[PARENT]'" />

<CreateLinesQuery Type="System.String" Value="

Select i.GID fItemGID, 1 Quantity, fItemMUGID,

sum(p.Quantity) Assign_NumericField1

From ESFIPeriodics p

Inner Join ESFIItem i on (i.GID = p.fItemGID)

Inner Join ESGOFiscalPeriod fp on (fp.GID = p.fFiscalPeriodGID)

Where fp.StartDate &gt;= date('now','-12 month')

and p.fTradeAccountGID = '[PARENT]'

and p.Quantity &gt;= 5

Group by i.GID"/>

<DocType Type="System.String" Value="9" />

<NullCustomer Type="System.Boolean" Value="false" />

<AutoSave Type="System.Boolean" Value="false" />

</Params>

</SampleAutoDocument>

  1. Add the command above as a button to be available on a selected customer (form: Sample3ListForm)

<RowTemplate>...

<RowTemplate>

<Property Name="Name" Value="SelectedRowTemplate" />

<Cell Type="Resco.Controls.AdvancedList.ButtonCell">

<Property Name="Text" Value="Sample-AutoDocument" />

<Property Name="CellSource" Value="TradeAccountGID" />

<Property Name="Name" Value="New#SampleAutoDocument" />

<Property Name="DesignName" Value="#82#322" />

<Property Name="Selectable" Value="true" />

</Cell>

</RowTemplate>

Document’s signature

The ability to conditionally display document’s signature screen is provided. To enable this feature, specifying via Business rules tool, an assignment rule updating document’s header field ShouldCaptureSignature, is required.

e.g. to avoid the display of signature screen when the invoice is characterized as “In cash”

<BusinessRule Title="Assignment to Signature / 0-OnChangeField"

Entity="ESFISalesDocument"

Activation="0"

Action="0"

Inactive="false">

<ExecutionConditions

Entity="ESFISalesDocument"

ScriptType="3"

Script="[ESFISalesDocument].[InCash] = 1"/>

<OnChangeField

Entity="ESFISalesDocument"

Field="InCash"

ScriptType="2"

Script="False"

AssignField="ShouldCaptureSignature"/>

</BusinessRule>

Document’s split

Example/ SampleSplitGiftDocument

The ESMobile application provides the abiliity to implement, via the Business rules tool, a rule that activates, while saving a record, the execution of a query or a command.

MOB-ImplementationGuide EN-image110.png Suppose for example that we want to issue, when saving an order that has gift lines, a gift document including all gift lines while at the same time deleting these lines from the original document.
  1. Gift document’s issuing

    • Create a NewDocumentCommand type command (e.g. command SampleSplitGiftDocument) that defines the elements required to generate a gift document. The header & lines data are declared in CreateHeaderQuery & CreateLinesQuery respectively.

<SampleSplitGiftDocument Assembly="Entersoft.Mobile.ESMobile"

Type="Entersoft.Mobile.ESMobile.NewDocumentCommand">

<Params>

<CreateHeaderQuery Type="System.String" Value="

Select

h.fTradeAccountGID Assign_fTradeAccountGID,

h.fAddressGID Assign_fAddressGID

From ESFISalesDocument h

Where h.GID = '[PARENT]' " />

<CreateLinesQuery Type="System.String" Value="

Select

l.fItemGID fItemGID, l.fItemMUGID fItemMUGID,

l.Quantity Quantity, l.fTaskItemGID Assign_fTaskItemGID,

l.Price Assign_Price,

l.Disc1 Assign_Disc1, l.Disc2 Assign_Disc2, l.Disc3 Assign_Disc3

From ESFISalesDocLineItem l

Where l.fDocumentGID = '[PARENT]' and l.TotalValue = 0 " />

<DocType Type="System.String" Value="9" />

<NullCustomer Type="System.Boolean" Value="false" />

<ShowDocument Type="System.Boolean" Value="false" />

</Params>

</SampleSplitGiftDocument>

  • Add to, order’s Business rules file, a rule that is activated after saving the order (Activation: 6-AfterSave) and results to the execution (Action: 2-Execute) of the command above (ScriptType: 8-Command). Note that, regarding the 8-Command script type syntax rules, the same apply as those described above for an action button and that variables [PARENT] or[CURRENT] are fed with the GID of the entity specified in the business rule.

<BusinessRule Title = "Create Gift Document / 6-AfterSave"

Entity = "ESFISalesDocument"

Activation = "6"

Action = "2"

Inactive = "false">

<ExecutionConditions

Entity = "ESFISalesDocLineItem"

Operator = "1"

ScriptType = "3"

Script = "[ESFISalesDocLineItem].[TotalValue] = 0"/>

<Execute

Entity = "ESFISalesDocument"

ScriptType = "8"

Script = "New#SampleSplitGiftDocument" />

</BusinessRule>

  1. Order’s gift lines deletion

Add to, order’s Business rules file, a rule that is activated after saving the order (Activation: 6-AfterSave) and results to the execution (Action: 2-Execute) of a query that deletes all gift lines included in the order (ScriptType: 1-SQL). Especially in case when the original document updates the van warehouse stock (e.g. Invoice document), the Business rule should also make the appropriate inventory update.

<BusinessRule Title = "Delete Gift Lines / 6-AfterSave"

Entity = "ESFISalesDocument"

Activation = "6"

Action = "2"

Inactive = "false">

<ExecutionConditions

Entity = "ESFISalesDocLineItem"

Operator = "1"

ScriptType = "3"

Script = "[ESFISalesDocLineItem].[TotalValue] = 0"/>

<Execute

Entity = "ESFISalesDocLineItem"

ScriptType = "1"

Script = "

update ESMMItemBalance set

LastUpdate = datetime('now', 'localtime'),

BranchBalance =

(select ib.BranchBalance + li.BasicQuantity

from ESMMItemBalance ib

inner join ESGOCompany com on ib.fWarehousegid = com.fcurrentWarehousegid

inner join ESFISalesDocLineItem li on li.fitemGID = ib.fitemGID

where li.GID = '[ESFISalesDocLineItem].[GID]' and li.TotalValue = 0 )

where fitemGID in

(select fitemGID

from ESFISalesDocLineItem

where GID = '[ESFISalesDocLineItem].[GID]' and TotalValue = 0 )

and fwarehouseGID in (select fcurrentWarehousegid from ESGOCompany);

delete from ESFISalesDocLineItem

where GID = '[ESFISalesDocLineItem].[GID]' and TotalValue = 0" />

</BusinessRule>

Online business policy

Matching document’s fields

When applying the online business policy process, all “named” fields of the current document are sent to & received from the server. To extent the process with header’s or line’s user definable fields, we should add specific commands that describe the preferable fields matching (command: OnLineSaveMapping for the sent to process & command: OnLineSaveReturnMapping for the receive from process) and place these commands in the document’s data entry screen folder (e.g. folder CSForms\GenericDocForm\6 for invoice document type).

e.g. to send to the server the data of header’s field “Table-1”

command: OnLineSaveMapping

<OnLineSaveMapping>

<Header>

<Columns>

<Column ServerName="fADTableField2Code" LocalName="fADTableField2Code" Type="System.String"/>

</Columns>

</Header>

<Line>

<Columns>

</Columns>

</Line>

</OnLineSaveMapping>

e.g. to receive from the server the data of header’s field “Number-1”

1st command: OnLineSaveMapping

<OnLineSaveMapping>

<Header>

<Columns>

<Column ServerName="ADValueField1" LocalName="NumericField1" Type="System.Decimal"/>

</Columns>

</Header>

<Line>...

</OnLineSaveMapping>

2nd command: OnLineSaveReturnMapping

<OnLineSaveMapping>

<Header>

<Columns>

<Column ServerName="ADValueField1" LocalName="NumericField1" Type="System.Decimal"/>

</Columns>

</Header>

<Line>...

</OnLineSaveMapping>

Auto apply

The ESMobile application provides the ability to configure the auto activation of online commercial policy process either on a point of sales basis or on a conditional basis. To enable this feature, the following settings are required:

  • Activate on a point of sales basis. The document’s type “Auto apply online business policy” flag must be activated, the address’s entity field (e.g. NumericField1) to be used from the process must be declared to “Doc_AutoApplyCommercialPolicy_SiteField” mobile parameter and finally, the specific field must be updated with value 1 or 0 for activation or not activation respectively.
  • Activate conditionally. The document’s type “Auto apply online business policy” flag must be deactivated while, via Business rules tool, an assignment rule updating document’s header field AutoApplyOnlinePolicy must be specified. The assignment must be activated when saving the document (Activation: 7-OnAboutToSave).

e.g. auto apply online commercial policy only when the document includes composite items

<BusinessRule Title = "Assignment to Auto apply CC / 7-OnAboutToSave"

Entity = "ESFISalesDocument"

Activation ="7"

Action = "0"

Inactive = "false">

<ExecutionConditions

Entity = "ESFISalesDocLineItem"

Operator = "1"

ScriptType = "3"

Script = " ESCountWhere|[ESFISalesDocLineItem].[ItemAssemblyType]|2| &gt; 0 "/>

<OnChangeField

Entity = "ESFISalesDocument"

ScriptType = "2"

Script = "True"

AssignField = "AutoApplyOnlinePolicy"/>

</BusinessRule>

e.g. auto apply online commercial policy only when the receipt includes transfer notes

<BusinessRule Title = "Assignment to Auto apply CC / 7-OnAboutToSave"

Entity = "ESTMCollection"

Activation ="7"

Action = "0"

Inactive = "false">

<ExecutionConditions

Entity = "ESTMCollectionItem"

Operator = "1"

ScriptType = "3"

Script = "'[ESTMCollectionItem].[PaymentMethodCode]' = '##ColPayTransferCode'"/>

<OnChangeField

Entity = "ESTMCollection"

ScriptType = "2"

Script = "True"

AssignField = "AutoApplyOnlinePolicy"/>

</BusinessRule>


PDF Version