I am new to salesforce dev, and wanted to know how can we fetch the apexlogs using a lightning component with tooling API?

I found this from the documentation: /sobjects/ApexLog/id/Body/.

But how can we get the "id" of ApexLog in LWC?

In aura components we can do it by force:recordId but how to do this in LWC?

Help is appreciated.

  • You can do SOQL on ApexLog Object to get the list of Ids. Then each one can be downloaded using the preferred API.
    – Saroj Bera
    Jun 21, 2022 at 8:00
  • Thanks I did the exact thing
    – dexxter_7
    Jun 21, 2022 at 18:51


You must log in to answer this question.

Browse other questions tagged .