Column : CaseNumber / ContactID (lookup)
I want to make them both as clickable link in <lightning-datatable
Code :
@wire(getAllCases, { lv0: '$listViewId' })
wiredOpps(result) {
const { data, error } = result;
if(result.data) {
console.log('vvvvvvv',data);
let nameUrl;
let preparedArr = [];
result.data.forEach(record => {
result.data.map((xx) =>{})
let preparedRec = {};
this.data = result.data.map((ssss) =>
Object.assign({ CaseNumberURL: "/clients/s/case/" + ssss.Id }, ssss));
//preparedRec.CaseNumberURL = record.CaseNumber;
preparedRec.Status = record.Status;
preparedRec.Subject = record.Subject;
preparedRec.ContactIdURL = record.Contact.Name;
preparedRec.Interaction_client__c = record.Interaction_client__c;
preparedRec.Date_ouverture__c = record.Date_ouverture__c;
preparedRec.Priority = record.Priority;
preparedRec.Type = record.Type;
preparedRec.Produit__c = record.Produit__c;
preparedRec.Environnement__c = record.Environnement__c;
preparedRec.SiteForPortal__c = record.SiteForPortal__c;
preparedRec.Developpement__c = record.Developpement__c;
preparedRec.CorrectionsReports__c = record.CorrectionsReports__c;
preparedRec.Nom_du_groupement__c = record.Nom_du_groupement__c;
preparedRec.Date_fermeture__c = record.Date_fermeture__c;
preparedArr.push(preparedRec);
});
this.cases = preparedArr;
}
if(error) {
this.error = error;
this.cases = [];
}
@track columns = [
{label: 'NUMERO DE LA REQUETE', fieldName: 'CaseNumberURL',type: 'url',typeAttributes: {label: { fieldName: 'CaseNumber' }, target: '_blank'},sortable: true},
{label: 'NOM DU CONTACT',fieldName: 'ContactIdURL',type: 'lookup',typeAttributes: {label: { fieldName: 'ContactId' }, target: '_blank'},sortable: true},
The problem i'm facing is that the column CaseNumberURL is get filled but it doesnt show value in UI