Below is my requirement:

For an Account,I want to display all it's task's attachments in a lightning table .

The Attachment Lightning table has a column 'related to' which should show 'Task Subject' data for all the fetched task records ,so that user can view the related task subject details plus click it to navigate to the task.

The Attachment object has 'parentid' and 'parent.name' but I cannot use it via soql as in this case, attachment's parent is task and task doesn't have any name field.

I am iterating on Attachment list to display attachment table with attachment fields - TYPE,TITLE,RELATED TO,LAST MODIFIED,CREATED BY. Under 'RELATED TO' columns, I need to display Task's subject

How to fetch task's subject field from it's attachment list

Any help would be appreciated.Thanks in advance !

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.