{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\
{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[JSFoundSet]{td}{td}[#foundset]
Returns parent foundset of the record.{td}{tr}{tbody}{table}\\
{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#getDataSource]\()
Returns the records datasource string.{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]{td}{td}[#getPKs]\()
Returns an array with the primary key values of the record.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isEditing]\()
Returns true or false if the record is being edited or not.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isNew]\()
Returns true if the current record is a new record or false otherwise.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#revertChanges]\()
Reverts the in memory outstanding (not saved) changes of the record.{td}{tr}{tbody}{table}\\
{table:id=property|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=foundset|class=node}{tr:id=name}{td}h6.foundset{td}{tr}{tr:id=des}{td}{sub-section:foundset_des|trigger=button|text=}{sub-section}{sub-section:foundset_des|trigger=none|class=sIndent}Returns parent foundset of the record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:foundset_snc|trigger=button|text=}{sub-section}{sub-section:foundset_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:foundset_prs|trigger=button|text=}{sub-section}{sub-section:foundset_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:foundset_ret|trigger=button|text=}{sub-section}{sub-section:foundset_ret|trigger=none|class=sIndent}[JSFoundSet] -- The parent foundset of the record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:foundset_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:foundset_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:foundset_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:foundset_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:foundset_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:foundset_sam|trigger=none}{code:language=javascript}
Div
style
display:none
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.
Enter additional information related to this 'class' inside the {div} macro with 'id=description'
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\
{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getDataSource|class=node}{tr:id=name}{td}h6.getDataSource{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataSource{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataSource_des|trigger=button|text=}{sub-section}{sub-section:getDataSource_des|trigger=none|class=sIndent}Returns the records datasource string.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataSource_snc|trigger=button|text=}{sub-section}{sub-section:getDataSource_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataSource_prs|trigger=button|text=}{sub-section}{sub-section:getDataSource_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDataSource_ret|trigger=button|text=}{sub-section}{sub-section:getDataSource_ret|trigger=none|class=sIndent}[String] -- The datasource string of this record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataSource_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataSource_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataSource_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataSource_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataSource_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataSource_sam|trigger=none}{code:language=javascript}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getPKs|class=node}{tr:id=name}{td}h6.getPKs{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getPKs{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getPKs_des|trigger=button|text=}{sub-section}{sub-section:getPKs_des|trigger=none|class=sIndent}Returns an array with the primary key values of the record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getPKs_snc|trigger=button|text=}{sub-section}{sub-section:getPKs_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getPKs_prs|trigger=button|text=}{sub-section}{sub-section:getPKs_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getPKs_ret|trigger=button|text=}{sub-section}{sub-section:getPKs_ret|trigger=none|class=sIndent}[Object]\[] -- an Array with the pk values.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getPKs_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPKs_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getPKs_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPKs_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getPKs_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPKs_sam|trigger=none}{code:language=javascript}
var pks = foundset.getSelectedRecord().getPKs() // also foundset.getRecord can be used
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=isEditing|class=node}{tr:id=name}{td}h6.isEditing{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}isEditing{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:isEditing_des|trigger=button|text=}{sub-section}{sub-section:isEditing_des|trigger=none|class=sIndent}Returns true or false if the record is being edited or not.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:isEditing_snc|trigger=button|text=}{sub-section}{sub-section:isEditing_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:isEditing_prs|trigger=button|text=}{sub-section}{sub-section:isEditing_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:isEditing_ret|trigger=button|text=}{sub-section}{sub-section:isEditing_ret|trigger=none|class=sIndent}[Boolean] -- a boolean when in edit.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:isEditing_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:isEditing_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:isEditing_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:isEditing_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:isEditing_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:isEditing_sam|trigger=none}{code:language=javascript}
var isEditing = foundset.getSelectedRecord().isEditing() // also foundset.getRecord can be used
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=isNew|class=node}{tr:id=name}{td}h6.isNew{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}isNew{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:isNew_des|trigger=button|text=}{sub-section}{sub-section:isNew_des|trigger=none|class=sIndent}Returns true if the current record is a new record or false otherwise.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:isNew_snc|trigger=button|text=}{sub-section}{sub-section:isNew_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:isNew_prs|trigger=button|text=}{sub-section}{sub-section:isNew_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:isNew_ret|trigger=button|text=}{sub-section}{sub-section:isNew_ret|trigger=none|class=sIndent}[Boolean] -- true if the current record is a new record, false otherwise;{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:isNew_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:isNew_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:isNew_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:isNew_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:isNew_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:isNew_sam|trigger=none}{code:language=javascript}
Returns true if the current record is a new record or false otherwise.
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
Boolean - true if the current record is a new record, false otherwise;
Table Row (tr)
id
sam
Table Cell (td)
Sample
Div
class
sIndent
Code Block
language
javascript
var isNew = foundset.getSelectedRecord().isNew();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=revertChanges|class=node}{tr:id=name}{td}h6.revertChanges{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}revertChanges{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:revertChanges_des|trigger=button|text=}{sub-section}{sub-section:revertChanges_des|trigger=none|class=sIndent}Reverts the in memory outstanding (not saved) changes of the record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:revertChanges_snc|trigger=button|text=}{sub-section}{sub-section:revertChanges_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:revertChanges_prs|trigger=button|text=}{sub-section}{sub-section:revertChanges_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:revertChanges_ret|trigger=button|text=}{sub-section}{sub-section:revertChanges_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:revertChanges_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:revertChanges_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:revertChanges_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:revertChanges_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:revertChanges_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:revertChanges_sam|trigger=none}{code:language=javascript}
Table Row (tr)
class
lastDetailRow
Table Cell (td)
Table Body (tbody)
id
revertChanges
Table Row (tr)
id
name
Table Cell (td)
revertChanges
Table Row (tr)
id
sig
Table Cell (td)
Span
style
margin-right: 5px;
void
Span
style
font-weight: bold;
revertChanges
Span
()
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Reverts the in memory outstanding (not saved) changes of the record.
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
void
Table Row (tr)
id
sam
Table Cell (td)
Sample
Div
class
sIndent
Code Block
language
javascript
var record= forms.customer.foundset.getSelectedRecord();
record.revertChanges();