5

Is there the possibility to query Lightning Web Component as for every other metadata (apex class, visualforce, etc...)? I see them on VS Code but I cannot know the CreatedBy, CreatedDate and the LastModifiedDate.

So, how can I know the CreatedBy, CreatedDate and the LastModifiedDate of a LWC?

11

To get CreatedBy, CreatedDate, LastModifiedDate fields values of your LWC bundle you can perform Tooling API request of the LightningComponentBundle

Also, you can use your Developer Console, and perform SOQL query with Tooling API:

SELECT Id, DeveloperName, CreatedBy.Name, CreatedDate, LastModifiedDate
FROM LightningComponentBundle
/* Optional filters */

DevConsole

7

Only Aura components are exposed for querying by SOQL but LWC components are not exposed for querying (But can query from tooling API - shown in answer by @OlehBerehovskyi). However, you find both Aura and LWC in Setup > Quick find > Lightning Components.

Notice the Type column which gives info of Aura/LWC. Also you can get CreatedBy, CreatedDate and the LastModifiedDate of a LWC

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.