1

All I want to do is query the last recently created/changed records in a salesforce org without specifying the object.

My Usecase is simply documentation: I want to review changes made by automations and make sure I do not miss any of them.

Alternatively finding the last created/changed records in Setup or anywhere else would also be sufficient for me.

What I tried so far:

  • Querying SELECT Id FROM SObject LIMIT 10 --> just to get a way of querying independent of object --> did not work
  • Searching setup

1 Answer 1

1

You can't query every single table simultaneously to get all the most recent records. I'm not aware of any database system with that level of capability without writing some kind of SQL script or a rather complicated query. Databases simply aren't meant to make that kind of query. What you can do is open the Developer Console in Salesforce, perform some action you're interested in tracing, and then read the log file. The log file will include the ID values for every record created, modified, deleted, or undeleted. In the case of asynchronous code, you may need to read through multiple logs.

1
  • Tanks for your answer! even though it is not 100% what I wanted, but knowing that things are not possible is also a help :)
    – Gerke
    Feb 9, 2023 at 12:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .