Configuration¶
All the configuration should be done with parameters that can be set in the LBS app config.
Examples¶
<!-- Helpdesk example-->
<div data-app="{
app:'addon_quick_note',
config:{
'newLineKeyCode': 95,
'saveKeyCode' : '42'
}
}"></div>
<!-- Company example-->
<div data-app="{
app:'addon_quick_note',
config:{
'callerTable' : 'company',
'newRecord': {
'table': 'history',
'buttonCssClass': 'btn-default',
'callerField': 'company',
'noteField': 'note',
'coworkerField': 'coworker',
'optionField': 'type',
'autoTimestampNoteOptionKey': 'noanswer',
'includeOptionKeyList': [],
'excludeOptionKeyList': [],
'customInputList': []
},
'autoRelationList': [],
'newLineKeyCode': 95,
'saveKeyCode' : '42'
}
}"></div>
<!-- Person example-->
<div data-app="{
app:'addon_quick_note',
config:{
'callerTable' : 'person',
'newRecord': {
'table': 'history',
'buttonCssClass': 'btn-default',
'callerField': 'person',
'noteField': 'note',
'coworkerField': 'coworker',
'optionField': 'type',
'autoTimestampNoteOptionKey': 'noanswer',
'includeOptionKeyList': [],
'excludeOptionKeyList': [],
'customInputList': []
},
'selectableRelation': {},
'newLineKeyCode': 95,
'saveKeyCode' : '42'
}
}"></div>
<!-- Deal example-->
<div data-app="{
app:'addon_quick_note',
config:{
'callerTable' : 'deal',
'newRecord': {
'table': 'history',
'buttonCssClass': 'btn-default',
'callerField': 'deal',
'noteField': 'note',
'coworkerField': 'coworker',
'optionField': 'type',
'autoTimestampNoteOptionKey': 'noanswer',
'includeOptionKeyList': [],
'excludeOptionKeyList': [],
'customInputList': []
},
'newLineKeyCode': 95,
'saveKeyCode' : '42'
}
}"></div>
<!-- Deal example with defaultOptionKey-->
<div data-app="{
app:'addon_quick_note',
config:{
'callerTable' : 'deal',
'newRecord': {
'table': 'history',
'buttonCssClass': 'btn-default',
'callerField': 'deal',
'noteField': 'note',
'coworkerField': 'coworker',
'optionField': 'type',
'defaultOptionKey': 'comment',
'autoTimestampNoteOptionKey': 'noanswer',
'includeOptionKeyList': [],
'excludeOptionKeyList': [],
'customInputList': []
},
'newLineKeyCode': 95,
'saveKeyCode' : '42'
}
}"></div>
<!-- SOS example-->
<!-- customInputList example -->
<!-- No autoRelationList example -->
<div data-app="{
app:'addon_quick_note',
config:{
'callerTable' : 'sos',
'newRecord': {
'table': 'history',
'buttonCssClass': 'btn-default',
'callerField': 'sos',
'noteField': 'note',
'coworkerField': 'coworker',
'optionField': 'type',
'autoTimestampNoteOptionKey': 'noanswer',
'includeOptionKeyList': [],
'excludeOptionKeyList': [],
'customInputList': [
{
'field': 'timeused',
'type': 'int', 'defaultValue': 5,
'visible': true,
'localizeTextCode': 'timeused'
},
{
'field': 'read',
'type': 'boolean',
'defaultValue': true,
'visible': false,
'localizeTextCode': ''
},
]
},
'autoRelationList': [],
'newLineKeyCode': 95,
'saveKeyCode' : '42'
}
}"></div>
<!-- Campaign example-->
<!-- selectableRelationQuery example -->
<div data-app="{
app:'addon_quick_note',
config:{
'callerTable' : 'campaign',
'newRecord': {
'table': 'history',
'buttonCssClass': 'btn-primary',
'callerField': 'campaign',
'noteField': 'note',
'coworkerField': 'coworker',
'optionField': 'type',
'autoTimestampNoteOptionKey': 'noanswer',
'includeOptionKeyList': [],
'excludeOptionKeyList': [],
'customInputList': []
},
'selectableRelation': {
'callerField': 'person',
'newRecordField': 'participant',
'parentTable': 'campaign'
},
'selectableRelationQuery': {
'limetype': 'participant',
'limit': 50,
'responseFormat': {
'object': {
'person': {
'_id': '',
'_descriptive': ''
}
}
},
'filter': {
'key': lbs.activeClass,
'op': '=',
'exp': lbs.activeInspector.Record.ID
}
},
'autoRelationList': [],
'newLineKeyCode': 95,
'saveKeyCode' : '42'
}
}"></div>
Available Parameters¶
Caller is the inspector from where Quick Note is initialized.
| Property | Default Value | Comment |
|---|---|---|
| callerTable | 'helpdesk' |
Database table name for caller. |
| newRecord | N/A | Object that holds settings for the record to be created. |
| newRecord.table | 'history' |
Database table name for new record |
| newRecord.buttonCssClass | 'btn-default' |
Css class for new record button. Choose from: 'btn-default', 'btn-primary', 'btn-succes' and 'btn-warning'. |
| newRecord.callerField | 'helpdesk' |
Database field name for caller on the new record. Usally the same as callerTable. |
| newRecord.noteField | 'note' |
Database field name for textarea on the new record, e.g., history note. |
| newRecord.coworkerField | 'coworker' |
Database field name for coworker on the new record. |
| newRecord.optionField | 'type' |
Database field name for a option list on the new record, e.g., history type. |
| newRecord.defaultOptionKey | '' |
Key of default option value. |
| newRecord.autoTimestampNoteOptionKey | 'noanswer' |
Option list key for use of Auto timestamp feature. |
| newRecord.includeOptionKeyList | [] |
Option list key for options to only include in option list, e.g., ['comment', 'noanswer'] will exlude all other options. |
| newRecord.excludeOptionKeyList | [] |
Option list key for options to exclude in option list, e.g., ['internalcomment', 'checklistcomment']. |
| newRecord.customInputList | [] |
List of custom inputs, e.g., [{'field': 'timeused', 'type': 'int', 'defaultValue': 5, 'visible': true, 'localizeTextCode': 'timeused'}] |
| selectableRelation | N/A | Object that holds settings for relation to set based on drop down menu. Set to empty object if no selectable relation should be used ('selectableRelation': {}). |
| selectableRelation.callerField | 'person' |
Database field name for selectable relation on caller. |
| selectableRelation.newRecordField | 'person' |
Database field name for selectable relation on new record. |
| selectableRelation.parentTable | 'company' |
Database table name for parent on selectable relation. |
| selectableRelation.filter | '&inactive=false&_sort=name' |
Lime CRM REST API filter for selectable relation. |
| selectableRelationQuery | '' |
Lime CRM Query API query. See selectableRelationQuery example above. |
| autoRelationList | N/A | Array of objects for relations to auto attach. Set to empty list if no auto relations should be used ('autoRelationList': []). Example how to set several objects to auto relate can be found here. |
| autoRelationList.object.callerField | 'company' |
Database field name for relation to auto attach from caller. |
| autoRelationList.object.newRecordField | 'company' |
Database field name for relation to auto attach on new record. |
| newLineKeyCode | null |
null == noaction or choose keyCode from Keyboard Shortcuts below. |
| saveKeyCode | null |
null == noaction or choose keyCode from Keyboard Shortcuts below. |
| cancelKeyCode | null |
null == noaction or choose keyCode from Keyboard Shortcuts below. |
| addNewRecordLocalize | 'add_history' |
Localize code for add new record. |
| addSelectableRelationLocalize | 'add_person' |
Localize code for add selectable relation. |
| removeSelectableRelationLocalize | 'remove_person' |
Localize code remove selectable relation. |
| saveLocalize | 'save' |
Localize code for save button. |
| cancelLocalize | 'cancel' |
Localize code for cancel button. |
| newRecordCreatedLocalize | 'history_created' |
Localize code for new record created message. |
| emptyNotePromptLocalize | 'empty_note_prompt' |
Localize code for empty note prompt. |
| notIntegerPromptLocalize | 'not_integer_prompt' |
Localize code for validation error for integer custom input. |
| saveAndCloseCaller | false |
true or false, close active inspector after new record is created. |
| callerDefaultValues | '' |
Set values on active inspector when new record is created. Used together with extra save button. Same format as doing a put with Lime CRM REST API. E.g set todo as done: '{'done': true,'todostatus':'done'}' |
| extraSaveButton | false |
true or false. Extra save button to use with callerDefaultValues. E.g for todo 'Add history and set done'. |
| extraSaveButtonLocalize | '' |
Localize code for extra save button. E.g for todo: 'save_and_close'. |
| refreshExplorer | '' |
Database table name for explorer to refresh on save of new record. E.g 'history'. |
Keyboard shortcuts¶
| Button | keyCode |
|---|---|
| ! | 33 |
| " | 34 |
| # | 35 |
| $ | 36 |
| % | 37 |
| & | 38 |
| ' | 39 |
| ( | 40 |
| ) | 41 |
| * | 42 |
| + | 43 |
| - | 45 |
| / | 47 |
| : | 58 |
| ; | 59 |
| < | 60 |
| = | 61 |
| > | 62 |
| ? | 63 |
| @ | 64 |
| [ | 91 |
| \ | 92 |
| ] | 93 |
| ^ | 94 |
| _ | 95 |
| ` | 96 |
| { | 123 |
| | | 124 |
| } | 125 |
| ~ | 126 |
| £ | 163 |
| ¤ | 164 |
| § | 167 |
| ¨ | 168 |
| ´ | 180 |
| ½ | 189 |