Last active
February 25, 2024 22:19
-
-
Save arufian/790f5004d33081f6bd207271dab43668 to your computer and use it in GitHub Desktop.
Revisions
-
arufian revised this gist
Apr 1, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ import { LightningElement, track, wire, api } from 'lwc'; export default class DynamicFields extends LightningElement { @api recordId; @track fields; @@ -9,7 +9,7 @@ export default class Covid19 extends LightningElement { record; connectedCallback() { this.fields = this.objectApiName === 'Account'? ['Account.BillingCity', 'Account.Name']: ['Contact.MailingCity', 'Contact.Name']; } renderedCallback() { -
arufian revised this gist
Apr 1, 2020 . No changes.There are no files selected for viewing
-
arufian created this gist
Apr 1, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ import { LightningElement, track, wire, api } from 'lwc'; export default class Covid19 extends LightningElement { @api recordId; @track fields; @api objectApiName; @wire(getRecord, { recordId: '$recordId', fields: '$fields' }) record; connectedCallback() { this.fields = this.objectApiName === 'Account'? 'Account.BillingCity': 'Contact.MailingCity'; } renderedCallback() { console.log(this.record, 'record'); } }