Child pages
  • JSRecord

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy sSummary12%30%58%height: 30px;3Property SummaryReturns last occurred exception on this record (or null).Returns parent foundset of the record.Returns the validation object if there where validation failures for this record Can be set to null again if you checked the problems, will also be set to null when a save was succesfulsuccessful.

servoy sSummary12%30%58%height: 30px;3Methods SummaryCreates and returns a new validation object for this record, which allows for markers to be used outside the validation flow.Returns a JSDataSet with outstanding (not saved) changed data of this record.Returns the records datasource string.Returns an array with the primary key values of the record.Returns true if the current record has outstanding/changed data.Returns true or false if the record is being edited or not.Returns true if the current record is a new record or false otherwise.Returns true or false if the related foundset is already loaded.voidReverts the in memory outstanding (not saved) changes of the record.

propertyservoy sDetail2100%height:30px2Property Detailsexceptionname

exception

dessIndent
Returns last occurred exception on this record (or null).
ret

Returns

sIndent The occurred exception.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowfoundsetname

foundset

dessIndent
Returns parent foundset of the record.
ret

Returns

sIndent The parent foundset of the record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
recordMarkersname

recordMarkers

dessIndent
Returns the validation object if there where validation failures for this record
Can be set to null again if you checked the problems, will also be set to null when a save was 
succesful
successful.
ret

Returns

sIndent The last
validtion validation object if the record was not validated.clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailscreateMarkersname

createMarkers()

dessIndent
Creates and returns a new validation object for this record, which allows for markers to be used outside the validation flow.
Will overwrite the current markers if present.
Can be set to null again if you checked the problems, will also be set to null when a save was successful.
ret

Returns

sIndent A new validation object.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowgetChangedDataname

getChangedData()

dessIndent
Returns a JSDataSet with outstanding (not saved) changed data of this record.
column1 is the column name, colum2 is the old data and column3 is the new data.

NOTE: To return an array of records with outstanding changed data, see the function databaseManager.getEditedRecords().
ret

Returns

sIndent a JSDataSet with the changed data of this record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDataSourcename

getDataSource()

dessIndent
Returns the records datasource string.
ret

Returns

sIndent The datasource string of this record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getPKsname

getPKs()

dessIndent
Returns an array with the primary key values of the record.
ret

Returns

sIndent an Array with the pk values.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
hasChangedDataname

hasChangedData()

dessIndent
Returns true if the current record has outstanding/changed data.
ret

Returns

sIndent true if the current record has outstanding/changed data.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isEditingname

isEditing()

dessIndent
Returns true or false if the record is being edited or not.

This will not check if the record doesn't really have any changes, it just returns the edit state.
So this can return true but databaseManager.getEditedRecord() will not return this record because that
call will check if the record has really any changed values compared to the stored database values.
Record can be in edit mode without changes when some field is focused (so edit is started) but no changes are done yet
or when changes were done in such a way that record data is the same as database data.
ret

Returns

sIndent a boolean when in edit.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
isNewname

isNew()

dessIndent
Returns true if the current record is a new record or false otherwise. New record means not saved to database.
ret

Returns

sIndent true if the current record is a new record, false otherwise;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
isRelatedFoundSetLoadedname

isRelatedFoundSetLoaded(relationName)

dessIndent
Returns true or false if the related foundset is already loaded. Will not load the related foundset.
prs

Parameters

sIndentrelationNamename of the relation to check for
ret

Returns

sIndent a boolean when loaded.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
revertChangesname

revertChanges()

dessIndent
Reverts the in memory outstanding (not saved) changes of the record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow