Showing posts from February, 2018

Using targetRecord on Lightning Data Service

The force:recordData attribute targetRecord promises to be a useful addition to Lightning Data Service in future versions. We had hoped that the schema information would be included in the object so that client side validation and conditional field display would be possible, but that doesn't seem to be the case. Available attributes fields: The fields that have been made accessible from force:recordData. e.g. v.record.fields.Name.value childRelationships: The child relationships defined on the record apiName: The full API Name of the record. e.g. Account id: The ID of the record recordTypeInfo: Any record type information relating to the record Convert the proxy to a readable object Sometimes being able to view the data in the record proxy object is useful for debugging. I have created a helpful method for this: In your component helper, insert the following code: Then, from anywhere in that component you can call helper.ouputProxy(record) where the reco

Handy Scripts for Salesforce Lightning Development

Lightning FLS. Throw exception if any field is not accessible. SLDS Wizard Progress Bar - Bar will not display without z-index on containing div Binding lightning:input checkbox value. Must bind to 'checked' not 'value' Control visibility of lightning component using slds-hide Lightning Select component markup with select inside iteration.