I am trying to implement TOC update in the document generation/processing system. I use the following code to accomplish it.
Unfortunately I found that some documents are now broken. I have some instances where hyperlinks are showing “according to 0” as opposed to previously “according to Appendix I” (just example that I have). This is something that I came across with. I cannot say what else can be affected and there is no way to check all the documents in the system. I assume it was caused by adding updateFields() to the existing code which caused update of all fields.
In my particular case I only want to support TOC. How can I achieve it? I want to update TOC and not force update of any other fields.