+ Start a Discussion
Ravi Kumar 6740Ravi Kumar 6740 

How to use lastmodifiedby Name in lightning datatable using LastModifiedById?

Yogendra JangidYogendra Jangid
Hi Ravi,

Have LastModifiedBy.Name in your SOQL and use that field reference in your lightning datatable.

Hope this answers your question, if so please can you mark this as best answer.
Ravi Kumar 6740Ravi Kumar 6740
I have used same in SOQL but i am not getting username in Datatable, instead I am getting Id's of user
Yogendra JangidYogendra Jangid
Hi Ravi,

Can you put here the code snippet how are you showing the value in datatable if possible
Suraj Tripathi 47Suraj Tripathi 47
Hi Ravi,
Greetings!

If you want to use the parent record information in the child record object.
Please use ParentObjectAPIName.FieldAPIName

like
SELECT LastModifiedBy.Username FROM Account;
In Datatable,
Use key.LastModifiedBy.Username

If you find your Solution then mark this as the best answer. 

Thank you!

Regards,
Suraj Tripathi
Ravi Kumar 6740Ravi Kumar 6740
Hi Suraj,

it is not working,
User-added image

Thanks,
Ravi
Suraj Tripathi 47Suraj Tripathi 47
Hi Ravi,
Please avoid using key, I don't understand the purpose of using key in the code.
or please provide some more details

If you find your Solution then mark this as the best answer. 

Thank you!

Regards,
Suraj Tripathi