I use another method.
app.executeCommand(2771);
app.executeCommand(2771);
This is the id for “Reveal All Modified Properties”. I first select the layer and then run this command twice. Once it shows all modified props and the second time it collapses all properties.
Andrei
My Envato portfolio.