Client API Reference
brixxApi Functions
The brixxApi provides a set of functions for each brixxbox. These functions can be used inside brixxbox events, to interact with the brixxbox and modify the behaviour of the application.
App Functions
Field Manipulation
setFieldValue(string controlId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
setControlUnmodifiedValue(string controlId, string valueToCompare) // Value can be of any javascript value type i.e. string, integer, Date etc.
setVisibility(string controlId, bool visible, string subControl) // visible(default True) and subControlare optional parameters.
setEnable(string controlId, bool visible, string subControl) // visible(default True) and subControl are optional parameters.
refresh(string controlId) // If used without parameter, refreshes all controls.
showTabPage(string controlId)setGridGrouping(string controlId, groupConfiguration) // groupConfiguration can either null, undefined or columnId.
setGridAutoRefresh(string controlId, Number autoRefreshSeconds ) // inputDate can be of Date type or a controlId of date/datetime control.
getCalcDateTime(inputDate, accuracy) // inputDate can be of Date type or a controlId of date/datetime control and accuracy can be seconds(default), minutes, or hours.
enableValidator(string controlId, string validatorName, bool enable) // enable can be true(default)/false.
setFieldUnit(string controlId, string unitName) // If no value is given for unitName then unit will be removed.
selectGridRows(string controlId, string columnId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
unselectGridRows(string controlId, string columnId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
switchTagControl(string controlId, bool editMode) // editMode is optional parameter.
setTextColor(string controlId, string colorName) // colorName can be "default", "primary", "secondary", "success", "danger", or "warning".
setFontWeight(string controlId, string fontWeight) // fontWeight can be normal or bold.
setFontStyle(string controlId, string fontStyle) // fontStyle can be italic or normal.
setBackgroundColor(string controlId, string colorName) // colorName can be "default", "primary", "secondary", "success", "danger", or "warning".
getSignatureImageBlob(string controlId, string type) // Type can be of png(default) or svg.
addCalendarEventSource(string controlId, eventSource) //eventSource is a JSON Object.
setFieldValue(string controlId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
setControlUnmodifiedValue(string controlId, string valueToCompare) // Value can be of any javascript value type i.e. string, integer, Date etc.
setVisibility(string controlId, bool visible, string subControl) // visible(default True) and subControlare optional parameters.
setEnable(string controlId, bool visible, string subControl) // visible(default True) and subControl are optional parameters.
refresh(string controlId) // If used without parameter, refreshes all controls.
setGridGrouping(string controlId, groupConfiguration) // groupConfiguration can either null, undefined or columnId.
setGridAutoRefresh(string controlId, Number autoRefreshSeconds ) // inputDate can be of Date type or a controlId of date/datetime control.
getCalcDateTime(inputDate, accuracy) // inputDate can be of Date type or a controlId of date/datetime control and accuracy can be seconds(default), minutes, or hours.
enableValidator(string controlId, string validatorName, bool enable) // enable can be true(default)/false.
setFieldUnit(string controlId, string unitName) // If no value is given for unitName then unit will be removed.
selectGridRows(string controlId, string columnId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
unselectGridRows(string controlId, string columnId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
switchTagControl(string controlId, bool editMode) // editMode is optional parameter.
setTextColor(string controlId, string colorName) // colorName can be "default", "primary", "secondary", "success", "danger", or "warning".
setFontWeight(string controlId, string fontWeight) // fontWeight can be normal or bold.
setFontStyle(string controlId, string fontStyle) // fontStyle can be italic or normal.
setBackgroundColor(string controlId, string colorName) // colorName can be "default", "primary", "secondary", "success", "danger", or "warning".
getSignatureImageBlob(string controlId, string type) // Type can be of png(default) or svg.
addCalendarEventSource(string controlId, eventSource) //eventSource is a JSON Object.
Printing and Documents
print(string controlId) // Id of report control which is to be printed.
printBlob(printDoc) // printDoc is a document which is to be printed.
createReport(reportControlId, createOptions) // CreateOptions is a JSON object. It contains options like print, archive, saveFile etc. for report creation.
Data Storage
copyConfigRecordById(string configName, Number recordId, additionalValues) // additionalValues is a JSON object, it contains values need to be modified in target record.
deleteRecord(options) // options is a JSON object which include properties id, noConfirmationMessage.
saveCurrentRecord(string configName, record) // record is a JSON like object.
executeStoredProcedure(string procedureName, procedureParameters, queryOptions) // procedureParameters and queryOptions are JSON objects.
queryStoredProcedure(string procedureName, procedureParameters, queryOptions) // procedureParameters and queryOptions are JSON objects.
refreshDataSource(string controlId) // Refreshes controlId. If used without parameters, it refreshes all controls with datasources.
sqlRead(string statementName, additionalParameters, queryOptions) // additionalParameters and queryOptions are JSON objects.
sqlWrite(string statementName, additionalParameters, queryOptions) // additionalParameters and queryOptions are JSON objects.
Build in Tools
composeEmail(emailOptions) // emailOptions is a JSON object, it contains options like to, cc, bcc, text, and subject etc which can be used to send an email.
getGeoLocation()
showWikiPage(string pageName, bool global) // If global is true, global wiki page is shown. Otherwise workspace wiki page is shown.
showDiscussion(bool show) // Default show value is is true.
showAttachments(bool show) // Default show value is is true.
showMessage(messageOptions) // messageOptions is a JSON object.
showMessageBox(messageBoxOptions) // messageBoxOptions is a JSON object.
messageBox(messageBoxOptions) // messageBoxOptions is a JSON object.
refreshAttachments()
getAttachmentById(Number id)
getAttachmentByFileName(string fileName)
getAttachmentsForCurrentRecord()
getAttachmentId(string fileName)
getConfigRecordAttachmentIdByFileName(string appName, Number recordId, string fileName)
downloadAttachments(downloadOptions) //downloadOptions is a JSON object. It iscludes resquestedIds list and file name for downloaded file.
uploadAttachment(blob data,Number documentTypeId, string fileName) // documentTypeId and fileName are optional parameters.
deleteAttachment(Number attachmentId)
replaceText(string text, additionalReplacement) // additionalReplacement is a JSON object with key value pairs.
callWebHook(string url, string message)
getCustomMessage(string messageName, params, string targetLanguage) // params is a JSON object.
getCustomSetting(string settingName)
serverFunction(string funcName, funcParams, options) // funcParams and options are JSON objects and optional parameters.
Business Brixx
DhlShiping
CreateShipment → Creates a DHL Shipping Label.
GetLabel → Shows the shipment Label again.
DPDShipping
DPD Shipping
Starting brixxboxes
startBrixxbox(startOptions) // startOptions is a JSON object with start parameters.
addEventListener(string eventName, string controlId,function func) // ControlId is optional parameter.
closeModal()
isModal()
createPublicAppUrl(options) //options is a JSON object.
closePublicAppUrl(options) //options is a JSON object.
logout()
Date and Time
The moment.js Library
Variables
userId
recordId
record
isLoadingRecord
isInitializing
Controls
NumBox
TextBox
Button
CheckBox
ComboBox
Grid
TabControl
TabPage
Accordion
Badge
FullCalendar
Camera
Chart
DateTimeBox
DateBox
DocViewer
AppConfig
FileImport
FormGroup
FormGroupRow
GridConfig
GroupBox
HorizontalLine
HtmlTable
HtmlTemplate
Image
Label
LinkLabel
MultilineTextBox
Report
Row
Scanner
SignaturePad
Tag
TemplateGrid
TemplateGridElement
TimeBox
Unit
WedgeScanner
Widget
WidgetContainer
WysiwygText
==
Common Functions →
App Functions →
Field Manipulation → Functions which manipulate properties, values or behaviors of a control.
Printing and Documents →
Data Storage →
Build in Tools →
Business Brixx →
Starting brixxboxes →
Date and Time →
Variables →
brixxApi Events
The brixxApi Events are used to react on certain events. This way you can customize the behaviour of the brixxbox to your own purpose. Some events will be raised befor the brixxbox executes their own logic for this event. In that case, you can return 'true' to avoid the brixxbox build in event. Otherwise the brixxbox will do its own logic after your event.
onClick → When a control is clicked.
onRowClick → When a grid row is clicked.
onCellClick → When a grid cell is clicked.
onChange → When a control content is changed.
onRecordLoad → Before a Record is loaded.
onRecordLoaded → After a Record is loaded.
onRecordSave → Before a Record is saved.
onRecordSaved → After a Record is saved.
onRowSelectionChanged → After a the selected row of a grid has changed.
onRowCreated → Modify a grid row. Apply a color for the row based on its values for example.
onRecordNew → After initializing the Form. The new Record is not saved yet but can be modified with initial values.
onRecordDelete → Before a record is deleted.
onRecordDeleted → After a record was deleted.
onChange → After a control value has changed.
onKeyPress → When a key is pressed
onKeyUp → When a key goes up
onKeyDown → When a key goes down
onModalClose → When a modal brixxbox app closes.
onAppStart → When the app is started but befor it is initialized.
onAppInitialized → When the app is initialized onAppStart has happend).
onScan → When a code is scanned.
onAttachmentsShow → Just before attachments panel opens.
onFileImport → When a file is uploaded for import.
onReturnFromModal → When a modal child app is closed, the parent will get this event
onAttachmentsShow → When the sidebar for attachments opens
onMailHistoryShow → When the sidebar for the mail history opens
onSubDataRequest → When the subdatasource of a control is requested
onChildAppClosed → When a childapp of your app closes.
onTabShown → Fires when a tab page is changing to visible.
onAttachmentDeleted → Triggers when the user deletes an attachment in the sidebar.
onAttachmentsHide → This event occurs when the attachment sidebar gets closed.
onDataTransform → The event can be used to transform a datasource line to a calender event.
onEventClick → The event occurs the user clicks on one of the events.
onEventChange → The event occurs the user moves or modifies an event.
onTimeSelected → The event triggers when the users selects a time period in the calendar.
Last updated