Constructor
new BusinessObject(app, objName, objInstName)
- Description:
Constructor
Parameters:
Name | Type | Description |
---|---|---|
app |
Simplicite.Ajax | Application Simplicite.Ajax instance |
objName |
string | Object name |
objInstName |
string | Object instance name, optional (default to the_ajax_<object name>) |
Members
count
- Description:
Current search result count.
Current search result count.
crosstabdata
- Description:
Current cross table data.
Current cross table data.
filters
- Description:
Current search filters. Use filters["<field name>"] or filters.<field name> to access to the filter value
Current search filters. Use filters["<field name>"] or filters.<field name> to access to the filter value
item
- Description:
Current item. Use item["<field name>"] or item.<field name> to access to the field value
Current item. Use item["<field name>"] or item.<field name> to access to the field value
list
- Description:
Current search result array of items.
Current search result array of items.
locals
- Description:
Local parameters
Local parameters
maxpage
- Description:
Current search result max page index (for paginated searches).
Current search result max page index (for paginated searches).
metadata
- Description:
Current meta data.
- name: object name
- instance: object instance name
- fields: fields definition array
- Etc.
Current meta data.
- name: object name
- instance: object instance name
- fields: fields definition array
- Etc.
page
- Description:
Current search result page index (for paginated searches).
Current search result page index (for paginated searches).
Methods
action(cbk, act, params)
- Description:
Calls an object action and loads action result.
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional |
||||||||||||||||||
act |
string | Action name |
||||||||||||||||||
params |
Object | Optional parameters Properties
|
addChangedField(f, id)
- Description:
Add a field when has changed
Parameters:
Name | Type | Description |
---|---|---|
f |
field or name |
|
id |
optional id (edit list) |
addItem(item, index)
- Description:
Add item to list
Parameters:
Name | Type | Description |
---|---|---|
item |
list item |
|
index |
optional creation index 00 01... |
associate(def, parentId, ids, item)
- Description:
Associate service
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
def |
Object | Associate definition Properties
|
|||||||||||||||
parentId |
string | parent object Id |
|||||||||||||||
ids |
Array | selected Ids to associate to parent |
|||||||||||||||
item |
Object | optional item for N,N data |
completion(cbk, field, req, params)
- Description:
Calls an object completion for specified field and loads action result.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
|||||||||||||||
field |
string | Field name |
|||||||||||||||
req |
string | Completion request |
|||||||||||||||
params |
Object | Optional parameters Properties
|
create(cbk, item, params)
- Description:
Creates and loads an item.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||||||||||||||||||||
item |
Object | Item to be created (row ID field of the item must be set to Simplicite.Ajax.DEFAULT_ROW_ID), optional (if absent current item is used) |
||||||||||||||||||||||||
params |
Object | Optional parameters Properties
|
crosstab(cbk, ctb, filters, params)
- Description:
Loads cross table data for search filters.
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||||||||||||||
ctb |
string | Cross table name |
||||||||||||||||||
filters |
Object | Filters to be applied, optional (if absent, current filters are used) |
||||||||||||||||||
params |
Object | Optional parameters Properties
|
del(cbk, item, params)
- Description:
Deletes item. Current item is set to undefined.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||
item |
Object | string | optional item to be deleted or rowId (if absent current item is used) |
||||||
params |
Object | Optional parameters Properties
|
deleteAll(cbk, params)
- Description:
Deletes all selected items.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||
params |
Object | Optional parameters Properties
|
get(cbk, rowId, params)
- Description:
Selects and loads an item for designated row ID (if row ID is
Simplicite.Ajax.DEFAULT_ROW_ID
, a default item for creation is returned with all default values applied).
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||||||||||||||||||||||||||||||||||||||||||||
rowId |
string | Row ID, mandatory (use current item ID if unset) |
||||||||||||||||||||||||||||||||||||||||||||||||
params |
Object | Optional parameters Properties
|
getAction(name)
- Description:
Get action definition
Parameters:
Name | Type | Description |
---|---|---|
name |
Action name |
getAgenda(name)
- Description:
Get agenda definition
Parameters:
Name | Type | Description |
---|---|---|
name |
Agenda name |
getArea(n)
- Description:
Get area definition
Parameters:
Name | Type | Description |
---|---|---|
n |
Area position |
getCount(cbk, filters, params)
- Description:
Count rows with filters and set count and maxpage in object.
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
filters |
Object | Filters to be applied, optional (if absent, current filters are used) |
params |
Object | Optional parameters |
getCrosstab(name)
- Description:
Get crosstab definition
Parameters:
Name | Type | Description |
---|---|---|
name |
Crosstab name |
getCrosstabCubes(cbk, name, params)
- Description:
Get crosstab cubes (data)
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||
name |
string | Crosstab name |
||||||
params |
Object | Optional parameters Properties
|
getDisplay()
- Description:
Get display label
getField(name, id)
- Description:
Gets field from fields array in meta-data (returns undefined if field is not found).
Parameters:
Name | Type | Description |
---|---|---|
name |
Field name or Field |
|
id |
Optional list index/rowId |
getFieldArea(n)
- Description:
Get field area definition
Parameters:
Name | Type | Description |
---|---|---|
n |
Area name or position |
getFieldIndex(name)
- Description:
Gets the field index in object
Parameters:
Name | Type | Description |
---|---|---|
name |
Field name or Field |
getFieldOldValue()
- Description:
Get old field value shorthand
getFieldValue(name, id)
- Description:
Get field value shorthand
Parameters:
Name | Type | Description |
---|---|---|
name |
Field name or Field |
|
id |
Optional list rowId |
getFields()
- Description:
Gets fields array from meta data (is undefined as long as meta data are not loaded using
getMetaData
).
getFilters(cbk, params)
- Description:
Loads current filters.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||||||||
params |
Object | Optional parameters Properties
|
getFiltersForSearch(cbk, params)
- Description:
Loads current filters for search (equivalent to a getFilters done with the search init context Simplicite.Ajax.CONTEXT_SEARCH).
Parameters:
Name | Type | Description |
---|---|---|
cbk |
Callback function called when loading is completed |
|
params |
Optional parameters |
getForCopy(cbk, rowId, params)
- Description:
Loads item for designated row ID for copy (equivalent to a get done with the copy init context Simplicite.Ajax.CONTEXT_COPY).
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
rowId |
string | Row ID, mandatory |
params |
Object | Optional parameters (same as for get function) |
getForCreate(cbk, params)
- Description:
Loads default item for creation (equivalent to a get done on default row ID with the create init context Simplicite.Ajax.CONTEXT_CREATE).
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
params |
Object | Optional parameters (same as for get function) |
getForDelete(cbk, rowId, params)
- Description:
Loads item for designated row ID for delete (equivalent to a get done with the delete init context Simplicite.Ajax.CONTEXT_DELETE).
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
rowId |
string | Row ID, mandatory |
params |
Object | Optional parameters (same as for get function) |
getForUpdate(cbk, rowId, params)
- Description:
Loads item for designated row ID for update (equivalent to a get done with the update init context Simplicite.Ajax.CONTEXT_UPDATE).
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
rowId |
string | Row ID, mandatory |
params |
Object | Optional parameters (same as for get function) |
getForeignKeys()
- Description:
Get foreign-key fields
getHelp()
- Description:
Gets context help from meta data (is undefined as long as meta data are not loaded using
getMetaData
).
getId()
- Description:
Gets Id from meta data.
getImageURL(item)
- Description:
Get URL of first image field
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | optional item (use field values if unset) |
getInstance()
- Description:
Gets instance name from meta data.
getInstanceName()
- Description:
Gets instance name from meta data (alias to getInstane).
getItem(id)
- Description:
Gets the current item
Parameters:
Name | Type | Description |
---|---|---|
id |
Optional index/rowId to look in current list |
getItemIndex(id)
- Description:
Gets the current item index
Parameters:
Name | Type | Description |
---|---|---|
id |
index/rowId to look in current list |
getLabel()
- Description:
Gets label from meta data (is undefined as long as meta data are not loaded using
getMetaData
).
getLink(object, field)
- Description:
Gets a link definition.
Parameters:
Name | Type | Description |
---|---|---|
object |
Referenced object or name |
|
field |
Foreign key field or name |
getLinkedList(field, value, target, lov, cbk, params)
- Description:
Gets a linked list of an enum field
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
field |
string | Enum field name |
||||||
value |
string | Selected value(s) separated with ";" |
||||||
target |
string | Linked field |
||||||
lov |
string | Current linked list name |
||||||
cbk |
function | Optional |
||||||
params |
Object | Optional error handler Properties
|
getLinks()
- Description:
Gets links array from meta data (is undefined as long as meta data are not loaded using
getMetaData
).
getListItem(i)
- Description:
Gets item in the current list
Parameters:
Name | Type | Description |
---|---|---|
i |
index |
getListPos(rowId)
- Description:
Gets the position in current list, -1 if not found
Parameters:
Name | Type | Description |
---|---|---|
rowId |
row Id to find |
getListValue(list, code)
- Description:
Gets value from list for specified code (returns undefined if code is not in list).
Parameters:
Name | Type | Description |
---|---|---|
list |
List metadata (typically from a field metadata) |
|
code |
Code |
getMetaData(cbk, params)
- Description:
Loads meta data for specified context.
Sample promise usage:
Example
obj.getMetaData({ context: app.CONTEXT_UPDATE }).then(meta => {
alert("Meta data loaded for update of object " + obj.getName());
});
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
|||||||||||||||
params |
Object | Optional parameters Properties
|
getName()
- Description:
Gets name from meta data.
getObjectField(f, data)
- Description:
Gets an Object Field
Parameters:
Name | Type | Description |
---|---|---|
f |
string | Simplicite.Ajax.ObjectField | Field name or metadata |
data |
Object | Optional contextual data { value, message } |
getOldValues()
- Description:
Get old values
getParameter(cbk, name, params)
- Description:
Loads an object parameter.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||
name |
string | Parameter name |
||||||
params |
Object | Optional parameters Properties
|
getParent()
- Description:
Get parent object
getParentObject()
- Description:
Get parent business object of panel instance
getParentObjectRefField()
- Description:
Get foreign key of panel instance
getPivotTable()
- Description:
Alias for getCrosstab
getPivotTableData()
- Description:
Alias for getCrosstabCubes
getPlacemap(name)
- Description:
Get placemap definition
Parameters:
Name | Type | Description |
---|---|---|
name |
Placemap name |
getPrintTemplate(name)
- Description:
Get print definition
Parameters:
Name | Type | Description |
---|---|---|
name |
Print template name |
getRootField(field)
- Description:
Get the root field of reference, null when field belongs to object
Parameters:
Name | Type | Description |
---|---|---|
field |
Field or name |
getRowId()
- Description:
Gets current item row Id value (returns undefined if not current item is loaded).
getRowIdField()
- Description:
Gets row Id field from meta data (returns undefined if row Id field name is undefined).
getRowIdFieldName()
- Description:
Gets row Id field name from meta data (is undefined as long as meta data are not loaded using
getMetaData
).
getStatusField()
- Description:
Get status field
getTransition(name)
- Description:
Get transition definition
Parameters:
Name | Type | Description |
---|---|---|
name |
Transition name |
getUserKeyFields()
- Description:
Get user-key fields
getValueForCode(field, code)
- Description:
Gets list of values field value from code (returns code if not found or not a list of value field)
Parameters:
Name | Type | Description |
---|---|---|
field |
Field |
|
code |
Field code |
getValues()
- Description:
Get values (fields into item)
getView(name)
- Description:
Gets a view definition.
Parameters:
Name | Type | Description |
---|---|---|
name |
View name |
getViews()
- Description:
Gets views array from meta data (is undefined as long as meta data are not loaded using
getMetaData
).
hasChanged(v)
- Description:
Trigger the has changed flag
Parameters:
Name | Type | Description |
---|---|---|
v |
optional to set the hasChanged value (true when the array of hasChangedFields is not empty) |
Returns:
the local parameter hasChanged
help(cbk, params)
- Description:
Gets the long help.
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
params |
Object | optional parameters error |
indexsearch(cbk, request, params)
- Description:
Search from index and loads search result items.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||||||||||||||||||||
request |
string | Index search request string |
||||||||||||||||||||||||
params |
Object | Optional parameters Properties
|
initChangedFields()
- Description:
Initialize the local parameters hasChanged and hasChangedFields
invokeMethod()
- Description:
Invoke method (unsupported on client side)
isAjaxInstance()
- Description:
Is ajax instance?
isChildOf()
- Description:
Is child of?
isCopied()
- Description:
Is copied record?
isDataMapInstance()
- Description:
Is datamap selection instance?
isDataMappedFrom()
- Description:
Is data-mapped from?
isFiltered(exclude)
- Description:
Is object filtered ?
Parameters:
Name | Type | Description |
---|---|---|
exclude |
field:value | Optional filters to ignore |
isHomeInstance()
- Description:
Is home instance?
isLoaded()
- Description:
Are metadata loaded ?
isMainInstance()
- Description:
Is main instance?
isNew()
- Description:
Is new record?
isOrdered()
- Description:
Is object ordered ?
isPanelInstance()
- Description:
Is panel instance?
isPanelOf()
- Description:
Is panel of?
isProcessInstance()
- Description:
Is process instance?
isRefInstance()
- Description:
Is reference selection instance?
isReferencedFrom()
- Description:
Is referenced from?
isRowIdField(f)
- Description:
Checks whether a field is the row ID field.
Parameters:
Name | Type | Description |
---|---|---|
f |
Field meta data |
isTimestampField(f)
- Description:
Checks whether a field is a timestamp field.
Parameters:
Name | Type | Description |
---|---|---|
f |
Field meta data |
isTmpInstance()
- Description:
Is temporary instance?
localParameter(name, value)
- Description:
Local parameter in object instance
Parameters:
Name | Type | Description |
---|---|---|
name |
Parameter key name |
|
value |
Optional value (to get or set, null to delete) |
merge(cbk, data, params)
- Description:
Service to merge items
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
|||||||||||||||||||||
data |
Object | merge data Properties
|
|||||||||||||||||||||
params |
Object | optional parameters error |
placemap(cbk, pcm, filters, params)
- Description:
Calls an object place map and loads places data.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
cbk |
function | Optional |
||||||
pcm |
string | Place map name |
||||||
filters |
Object | Optional filters to apply (if absent, current filters are used) |
||||||
params |
object | Optional parameters Properties
|
populate(cbk, item, params)
- Description:
Populate item (e.g. after getForCreate and after having set foreign keys)
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||||||||||||||
item |
Object | Item to be populated, optional (if absent current item is used) |
||||||||||||||||||
params |
Object | Optional parameters Properties
|
predefSearch(cbk, method, ps, params)
- Description:
Predefined search service (of user's private searches, public searches are protected)
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
method |
string | create|update|delete|select |
ps |
Object | Predefined search to save |
params |
Object | error |
preferences(cbk, prefs, params)
- Description:
Preferences service.
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
prefs |
Object | optional preferences to save |
params |
Object | optional parameters error |
print(cbk, prt, params)
- Description:
Calls an object publication and loads publication result.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional |
||||||||||||
prt |
string | Print template name |
||||||||||||
params |
object | Optional parameters Properties
|
remove()
- Description:
Same as del function
removeArea(n)
- Description:
Remove area in metadata if position exists
Parameters:
Name | Type | Description |
---|---|---|
n |
Area position |
removeChangedField(f, id)
- Description:
Remove a field when has not changed
Parameters:
Name | Type | Description |
---|---|---|
f |
field or name |
|
id |
optional id (edit list) |
removeItem(id)
- Description:
Remove item from list
Parameters:
Name | Type | Description |
---|---|---|
id |
index/rowId in current list |
removeParameter(cbk, name, params)
- Description:
Remove an object parameter.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||
name |
string | Parameter name |
||||||
params |
Object | Optional parameters Properties
|
resetFilters()
- Description:
Reset filters (not orders and groups)
resetGroupByFields()
- Description:
Reset group by fields
resetOrders()
- Description:
Reset orders (not filters)
resetValues(old)
- Description:
reset values (item into fields)
Parameters:
Name | Type | Description |
---|---|---|
old |
true to reset old values |
save(cbk, item, params)
- Description:
Saves (create or update) and loads an item.
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
item |
object | Item to be saved, optional (if absent current item is used) |
params |
object | Optional parameters (see create or update method) |
search(cbk, filters, params)
- Description:
Search and loads search result items.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
filters |
Object | Optional filters to apply (if absent, current filters are used) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
params |
Object | Optional parameters Properties
|
searchForList(cbk, filters, params)
- Description:
Search and loads search result items for list (equivalent to a search done with the list init context
Simplicite.Ajax.CONTEXT_LIST
).
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
filters |
Object | Filters to be applied, optional (if absent, current filters are used) |
params |
Object | Optional parameters |
searchForPanelList(cbk, filters, params)
- Description:
Search and loads search result items for panel list (equivalent to a search done with the list init context
Simplicite.Ajax.CONTEXT_PANELLIST
).
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||
filters |
Object | Filters to be applied, optional (if absent, current filters are used) |
||||||
params |
Object | Optional parameters Properties
|
select()
- Description:
Same as get function
selectForCopy()
- Description:
Same as getForCopy function
selectForCreate()
- Description:
Same as getForCreate function
selectForDelete()
- Description:
Same as getForDelete function
selectForUpdate()
- Description:
Same as getForUpdate function
selectRow(sel, cbk, params)
- Description:
Select row(s).
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
sel |
string | selected = |
||||||
cbk |
function | Optional |
||||||
params |
Object | Optional error handler Properties
|
setCrosstab(name, meta)
- Description:
Set crosstab definition
Parameters:
Name | Type | Description |
---|---|---|
name |
Crosstab name |
|
meta |
Crosstab metadata |
setFieldOldValue()
- Description:
Set old field value shorthand
setFieldValue(name, val, id)
- Description:
Set field value shorthand
Parameters:
Name | Type | Description |
---|---|---|
name |
Field name or a field |
|
val |
Value |
|
id |
Optional list rowId |
setList(field, list, cbk, params)
- Description:
Set a new list to field.
Parameters:
Name | Type | Description |
---|---|---|
field |
string | Enum field name |
list |
string | List name to load |
cbk |
function | Optional |
params |
Optional error handler |
setParameter(cbk, name, value, params)
- Description:
Sets (or remove) an object parameter and loads it back.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||
name |
string | Parameter name |
||||||
value |
string | Parameter value (unset if null) |
||||||
params |
Object | Optional parameters Properties
|
setParent()
- Description:
Store parent object in panel instance
{ name, inst, field, rowId, object }
setPivotTable()
- Description:
Alias for setCrosstab
setRowId()
- Description:
Sets current item row Id value.
setValues(item, old, id)
- Description:
Set values (item into fields)
Parameters:
Name | Type | Description |
---|---|---|
item |
values per field name, default: current item |
|
old |
true to copy values into old values ? |
|
id |
optional list index/rowId |
timesheet(cbk, data, params)
- Description:
Timesheet service
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
data |
Object | timesheet data { name, resId } |
params |
Object | optional parameters error |
update(cbk, item, params)
- Description:
Updates and loads an item.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
||||||||||||||||||||||||||||||
item |
OBject | Item to be updated, optional (if absent current item is used) |
||||||||||||||||||||||||||||||
params |
Object | Optional parameters Properties
|
updateAll(cbk, item, params)
- Description:
Updates all (selected) items.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
function | Optional function called when loading is completed (returns a Promise if absent) |
|||||||||
item |
Object | Item with fields to be updated for each selected Ids |
|||||||||
params |
Object | Optional parameters Properties
|