0

can you help me in auto-populating the existing lookup field values. There is an example in this website : https://live.playg.app/play/lookup-in-lightning-datatable-lwc

I need to display all the records with field values of Asset object in a Datatable.

Two objects : Asset__c, Data_Category__c.

Asset__c object has a lookup field related to Data_Category__c. (fieldname: Category)

Below is my code :

Help me understand what values needs to be passed to : (parent/child)

fieldName = =

object =

label=

displayFields: "",

displayFormat: "",

valueId: { fieldName: },

{

            label: 'Category', fieldName: 'parentCategoryId', type: 'lookup', typeAttributes: {

                placeholder: 'Select Parent Account',

                uniqueId: { fieldName: 'assetId' }, //pass Id of current record to lookup for context

                object: "Data_Category__c",

                icon: "standard:account",

                label: "Data Category",

                displayFields: "Name",

                displayFormat: "Name",

                filters: "",

                valueId: { fieldName: 'parentCategoryId' },

                

                

            }

Any suggestion from anyone would be helpful, Thankyou.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.