You need to sign in to do that
Don't have an account?
Abhishek Pandey 180
relation in Lightning data table
{ label: 'Hospital', fieldName: 'Hospital__r', type: 'Name' },
{ label: 'Material number', fieldName: 'Product__r.Mtrl_nbr__c', type: 'Text' },
{ label: 'Product', fieldName: 'Product__r.Name', type: 'Text' }
I am getting blank values in the above field in the lightning data table. Pls help how to show the relation in lightning data table
{ label: 'Material number', fieldName: 'Product__r.Mtrl_nbr__c', type: 'Text' },
{ label: 'Product', fieldName: 'Product__r.Name', type: 'Text' }
I am getting blank values in the above field in the lightning data table. Pls help how to show the relation in lightning data table
You have to handle it via javascript:
Change the column as :
{ label: 'Material number', fieldName: 'ProductMtrlnbr', type: 'Text' },
{ label: 'Product', fieldName: 'ProductName', type: 'Text' }
https://www.salesforcecodecrack.com/2019/06/display-reference-parent-fields-data.html
https://salesforce.stackexchange.com/questions/200761/parent-field-in-lightning-datatable
Thanks,
Maharajan.C