You need to sign in to do that
Don't have an account?
Phuc Nguyen 18
LWC able to retrieve record Id but need to get other record fields
Hello All,
I am working on a LWC. Currently I can retrieve the record Id and pass it to a handler
Now I want to pass another field off the record but unsure how to retrieve it. I tried this but it does not work
Any suggestions would be greatly appreciated.
Thanks
P
I am working on a LWC. Currently I can retrieve the record Id and pass it to a handler
@api recordId; console.log('Job RecordId is ' + this.recordId); getContactName{recordId : this.recordId})
Now I want to pass another field off the record but unsure how to retrieve it. I tried this but it does not work
import JOB_NAME_FIELD from '@salesforce/schema/Contact__c.Job_Name__c'; getFieldValue(this.recordId, JOB_NAME_FIELD);
Any suggestions would be greatly appreciated.
Thanks
P
Please try the below and see if it works-
Let me know if this worked for you.
All Answers
Please try the below and see if it works-
Let me know if this worked for you.
Thank you for the reply and suggestion. Can I put this inside a connectedcallback?
Thank you,
P