Internally here at skuid, these are some good developing tricks we’ve learned along the way. I hope they help you build the filter you want and help you see what is happening to better build whatever you want.
clear() (or use Command+K or the symbol in the top left corner of the dev console
Clears your console
var $ = skuid.$;
After calling this, you have access to all jQuery functions, simply using the $.
Example: Can call $(‘#unique-id’).hide() rather than skuid.$(‘#unique-id’).hide()
skuid.page.name
Returns the Name of the Skuid page
skuid.$.blockUI()
skuid.$.blockUI({ message: '
http://i298.photobucket.com/albums/mm250/AnalystRealist/rotating_globe.gif"; /> Just a moment...
' });
Cool experimental ‘waiting’ animation with external url
skuid.$.unblockUI()
The skuid.$.blockUI() and skuid.$.unblockUI() are equivalent to the "Show Message and Block UI" and "Unblock UI" Actions Framework actions. These functions are actually part of a jQuery plugin used by Skuid. Documentation here:http://jquery.malsup.com/block/
skuid.model.map()
skuid.model.getModelsList()
Returns a list of the current Models
skuid.model.getModel(‘ModelName’)
Same as skuid.$M(‘ModelName’)
skuid.$M(‘ModelName’)
Returns all the guts of your model. Shortcut for skuid.model.getModel(‘ModelName’)
[Returns a skuid.model.Model object]
skuid.$M(‘ModelName’).objectName
Returns the Salesforce Object name for the Model
var myMod=skuid.$M(‘ModelName’)
Creates a variable called ‘myMod’ that can be used instead of skuid.$M(‘ModelName’)
This line will return ‘undefined’, but that’s Ok
Example: myMod.data[0]
skuid.$M(‘ModelName’).length
Returns the number of rows in the model
skuid.$M(‘ModelName’).data
Returns all the record rows inside your model.
skuid.$M(‘ModelName’).data[0] or skuid.$M(‘ModelName’).getRows()[0] or .getFirstRow()
Returns the first record inside your model
skuid.$M(‘ModelName’).data[0].fieldName
Returns the value of whatever field name you indicate for first record inside your model
skuid.$M(‘ModelName’).soql
Returns the whole Query along with the conditions (Where)
skuid.$M(‘ModelName’).getField(‘FieldName’)
Returns the ‘properties’ of the field for that model
skuid.$M(‘ModelName’).dataMap
Returns the Id, Id15 and other useful information about the data fields in a model
skuid.$M(‘ModelName’).fieldsMap
Returns the properties of all the fields in a model
skuid.$M(‘ModelName’).conditions
Check conditions > inactive → if it means false, then this condition is being applied, if true, then this condition is default filterable off
skuid.$M(‘ModelName’).doQuery
This only returns ‘true’ or ‘false’. It indicates if Model query should be run on page load
skuid.$M(‘ModelName’).createRow
Haven’t played with this one yet, but looks very useful
skuid.$C(‘unique-id’)
Get all kinds of helpful information about that particular component (e.g. table, field editor).
[Returns a skuid.component.Component object]
skuid.$C(‘unique-id').getPageParameters()
skuid.dataSource.map() Gives you a lot of good information about data sources available in the current context. For example from run time it will give you a list of data sources available to the page, from builder it will give you a list of all data sources in the org.
Skuid.time is helpful for doing lots of things related to date or date time. You can use salesforce formatted dateTimes or the JS new Date() command. However you may want to define variables to make your life easier.
Dev console not working?
Try toggling off Salesforce Headers for your Skuid page in the Layout Tab of the page properties panel in the Page Composer. Alternatively, try Firefox...