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 at 8:00
  • Thanks I did the exact thing
    – dexxter_7
    Jun 21 at 18:51


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.