In the InDesign interface, you can select your TOC and simply click Layout/Update TOC to update it. Is this possible with a script or do I have to recreate the TOCs using the document.createTOC() method? That's all I can find in the object model.
I have a book with 33 chapters and each has its own table of contents. All the tables have been set up, I just need to update them so they have the correct page number.
You looked in the right place, but might have overlooked this:
Array of Story createTOC (using:TOCStyle[, replacing:bool=false][, fromBook:Book][, placePoint: Array of number][, includeOverset:bool=false][, destinationLayer:Layer])
replacing (bool) If true, replaces the existing TOC. (Optional) (default: false)
Sounds like all you need to add is
document.createTOC([your toc style], true);
That's exactly what I needed. Thanks!