BusinessObject

Simplicite.Ajax. BusinessObject

Simplicité business object.
Getting a new business object should use the Simplicite.Ajax.getBusinessObject() function instead of this constructor

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 function({ data, redirect: {url, target} }) called when loading is completed (returns a Promise if absent)

act string

Action name

params Object

Optional parameters

Properties
Name Type Description
values Object

pairs of field/value

metadata boolean

true to update the metadata in context UPDATE on form action or LIST on list action

init boolean

true to initAction only on server side and get Action fields metadata in callback

transition string

optional transition name to init its action

track string

async tracking of action status|stop|minify

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
Name Type Description
parent string

Parent object name

parentRefField string

Foreign key field to parent

child string

Optional child object name (when obj is a N,N relationship)

childRefField string

Foreign key field to child

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
Name Type Description
max number

Optional max size, default 15

context number

Optional context CONTEXT_SEARCH or CONTEXT_UPDATE

values Object

Optional current fields values

error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
inlineDocs boolean | string | Array

Inline documents (true | 'images' only | 'infos' without content | array of fields) ?

inlineThumbs boolean | Array

Inline image documents thumbnails (true | array of fields) ?

inlineObjs boolean

Inline objects fields items (true|false) ?

metadata boolean

true to update the metadata in context UPDATE when created

target boolean

true to get target object if any

progress function

Optional progress callback

error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
ztree boolean

get lines tree with sums and metadata

zstotal boolean

get sub-totals ?

zstcolor string

sub-totals color

zaxis Object

change axis ordering [{name, order, type, method}]

error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
context number

Init context (one of Simplicite.Ajax.CONTEXT_CREATE/UPDATE/DELETE/COPY constants)

metadata boolean

true to update the metadata in context

inlineDocs boolean | string | Array

Inline documents (true or 'images' for images only or 'infos' for documents data without content or array of field names) ?

inlineThumbs boolean | Array

Inline image documents thumbnails (true | array of fields) ?

inlineObjs boolean

Inline objects fields items (true|false) ?

fields Array

Array of field names to retrieve (if absent or undefined, all fields are retrieved)

values Object

Optional field values to set and foreign keys to populate

parent Object

Optional parent context {name,inst,field,rowId} to populate related fields (useful in CONTEXT_CREATE)

social boolean

true to get posts count

share boolean

true to get social share data

treeView string

Optional treeview name to get a tree from this root

treeDepth number

Search depth in tree

treeHistory boolean

true update and get the user's trees history

treePath string

optional tree path

error function

Custom error handler (unused by Promise with catch)

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 { parent, view, metadata }

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
Name Type Description
error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
context number

Init context (normally Simplicite.Ajax.CONTEXT_SEARCH constant), optional

reset boolean

Reset filters, optional

error function

Custom error handler (unused by Promise with catch)

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).

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 function({target, list}) called when loading is completed (returns a Promise if absent)

params Object

Optional error handler

Properties
Name Type Description
all boolean

Get all linked values when value is empty

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
Name Type Description
context number

Context (one of Simplicite.Ajax.CONTEXT_* constants)

contextParam string

Context single parameter (agenda name...)

parent Object

Parent of PANELLIST { name, inst, field, rowId }

error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
error function

Custom error handler (unused by Promise with catch)

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).

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
Name Type Description
inlineDocs boolean | string | Array

Inline documents (true | 'images' only | 'infos' without content | array of fields) ?

inlineThumbs boolean | Array

Inline image documents thumbnails (true | array of fields) ?

inlineObjs boolean

Inline objects fields items (true|false) ?

context number

optional context

parent Object

optional parent { name, inst, field, rowId } to search references

filters Object

optional linkmap filters to limit search

error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
ids Array

array of row IDs to merge

check Array

true to check only (isMergeEnable)

item Object

index per field to preserve

links Object

indexes per link to preserve

linkIds Object

optional limited link Ids per link and idexes to preserve

metaobj Object

indexes per meta-object to preserve

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 function(result) called when loading is completed (returns a Promise if absent)

pcm string

Place map name

filters Object

Optional filters to apply (if absent, current filters are used)

params object

Optional parameters

Properties
Name Type Description
error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
inlineDocs boolean | string | Array

Inline documents: true | 'images' only | 'infos' without content | array of fields

inlineThumbs boolean | Array

Inline image documents thumbnails: true | array of fields

inlineObjs boolean

Inline objects fields items

userKeys boolean

Get foreign user-keys

error function

Custom error handler (unused by Promise with catch)

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 { id, name, filters }

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 { list, search, actions }

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 function(result) called when loading is completed (returns a Promise if absent)

prt string

Print template name

params object

Optional parameters

Properties
Name Type Description
all boolean

Apply template to all items matching current filters (false by default, which means apply template only to current item) ?

mailing boolean

Apply template individually to all items matching current filter (false by default) ?

error function

Custom error handler (unused by Promise with catch)

remove()

Description:
  • Same as del function

removeArea(n)

Description:
  • Remove area in metadata if position exists

Parameters:
Name Type Description
n

Area position

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
Name Type Description
error function

Custom error handler (unused by Promise with catch)

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)

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
Name Type Description
context number

Init context (normally one of Simplicite.Ajax.CONTEXT_LIST/PANELLIST/REFSELECT/DATAMAPSELECT/EXPORT/CROSSTAB/GRAPH/PRINTTMPL constant), optional

metadata: boolean

true to update the metadata in context, and items with { meta:{...}, data:{...} }, false to get the data directly

page number

Page index to retrieve (between 0 and maxpage), optional (if absent or set to -1 no pagination will be done, for pagination a first call must be done with pageIndex set to 0)

inlineDocs boolean | string | Array

Inline documents (true | 'images' only | 'infos' without content | array of fields) ?

inlineThumbs boolean | Array

Inline image documents thumbnails (true | array of fields) ?

inlineObjs boolean

Inline objects fields items (true|false) ?

parent Object

optional parent object { name, inst, field, rowId } in CONTEXT_PANELLIST|REFSELECT|DATAMAPSELECT

view Object

optional view { name:viewname, item:position, home:true|false } in CONTEXT_LIST

history boolean

true to get rows histories

totals boolean

true to get the field aggregations

social boolean

true to get posts count for each row

visible boolean

true to get only visible fields

edit string

optional edit list mode 'new', 'rows' or 'upsert'

searchId string

optional preset search to apply

groupby boolean

true to get the group by result

partial boolean

true to get result for lazy-loading without changing the object data

error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
parent Object

optional parent object { name, inst, field } in CONTEXT_PANELLIST

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 = all, page, none or specific row IDs (single or array or semicolon-separated)

cbk function

Optional function(ids) called when loading is completed (returns a Promise if absent)

params Object

Optional error handler

Properties
Name Type Description
replace boolean

true to replace all selection

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 function({field, list}) called when loading is completed (returns a Promise if absent)

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
Name Type Description
error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
inlineDocs boolean | string | Array

Inline documents (true | 'images' only | 'infos' without content | array of fields) ?

inlineThumbs boolean | Array

Inline image documents thumbnails (true | array of fields) ?

inlineObjs boolean

Inline objects fields items (true|false) ?

metadata boolean

true to update the metadata in context UPDATE

context number

optional to specify when update occurs on a LIST

timestamp boolean

false to bypass timestamp check and update (silent update)

itemAction Object

optional action parameters of transition

progress function

Optional progress callback

error function

Custom error handler (unused by Promise with catch)

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
Name Type Description
progress function

Optional progress callback

error function

Custom error handler (unused by Promise with catch)