new EditRelationObject(remoteAPI, editHandle, entity, detail, key, detailKey [, relationId])
Opens an edit context for a relation. If the relation does not yet exist, it is created.
A context remains memory-resident (on the web server) until it is closed. Always match with a closeContext() call to avoid memory consumption.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
remoteAPI |
RemoteAPI | ||
editHandle |
number | Possibility to pass an existing editHandle | |
entity |
string | The entity name, e.g. "Comp" | |
detail |
string | The detail name, e.g. "Cont" | |
key |
number | The key of the entity | |
detailKey |
number | The key of the detail | |
relationId |
number |
<optional> |
The key of the relation if multi-relation is available |
- Source:
Properties:
Name | Type | Description |
---|---|---|
entity |
string | The entity name |
key |
number | The key of the entity record |
detail |
string | The detail name |
detailkey |
number | The key of the detail record |
edithandle |
number | The handle of the edit operation |
inserted |
boolean | True when record is newly inserted in the DB |
data |
object |
Extends
- RemoteObject
Members
-
<protected> closecontext
-
- Source:
-
<protected> commit
-
- Source:
-
<protected> inserted
-
- Source:
Methods
-
<protected> afterExecute()
-
- Source:
-
<protected> asJsonRpc()
-
- Source:
-
closeContext()
-
Closes the context and frees the memory on the web server.
- Source:
-
closingCommit()
-
Commits the changes, releases the record and executes closeContext
- Source:
-
commitChanges()
-
Commits the changes to the database.
- Source:
-
getMasterDataSet( [tableView])
-
Retrieves a master
DataSet
from the edit context.Parameters:
Name Type Argument Default Description tableView
number <optional>
0 - Source:
Returns:
- Type
- DataSetObject
-
updateField(name, value)
-
Updates the field values of a master data set
Parameters:
Name Type Description name
string value
string | number - Source:
-
updateFields(fieldsObj)
-
Updates the field values of a master data set.
Parameters:
Name Type Description fieldsObj
object e.g. {"OPENED": "0"} - Source:
-
updateReciprocityField(name, value)
-
Updates the field values of a reciprocity table view, e.g. CONT_CONT.RELATION of the 2nd record
Parameters:
Name Type Description name
string value
string | number - Source:
-
updateReciprocityFields(fieldsObj)
-
Updates the field values of a reciprocity table view, e.g. CONT_CONT.RELATION of the 2nd record
Parameters:
Name Type Description fieldsObj
object e.g. {"OPENED": "0"} - Source: