import { mix, useRecordsFields, BoltElement } from 'c/bolt';
export default class myLwc extends mix( [useRecordsFields, fields], BoltElement) { }
Constructor
fields
Field[][]
import FirstName from '@salesforce/schema/Case.Contact.FirstName';import ContactId from '@salesforce/schema/Case.ContactId';import LastName from '@salesforce/schema/Account.LastName';export default class myLwc extends mix( [useRecordFields, [ [FirstName, ContactId], [LastName] ]], BoltElement) { recordIds = { CaseId: 'XXXXX', AccountId: 'YYYYYY' }; }
Record
import FirstName from '@salesforce/schema/Case.Contact.FirstName';import ContactId from '@salesforce/schema/Case.ContactId';export default class myLwc extends mix( [useRecordFields, [FirstName, ContactId]], BoltElement) { @api recordId; doSomething() { console.log(this.Case.Contact.FirstName); console.log(this.Account.LastName); } }