var annots = this.getAnnots();
for each (annot in annots)
if (annot.type == "Redact")
if (annot.overlayText == "V1")
annot.overlayText = "V01";
cName: "Set any redaction boxes from V1 to new V01 code format",
cTooltext: "V1 to V01",
cEnable: "event.rc = (app.doc != null)"
I would very much appreciate any help or advice. Note that this is not actually my job or training; we just don't have anyone with the necessary expertise.
If you have the above code installed as a folder-level script, then yes, a simple call to RedactionCodeToV01() from your Action should be enough. And "undefined" does not mean anything went wrong. It simply means the code finished executing without returning any values or throwing any errors, so it's actually a good thing.
If you use this in an Action, though, make sure you add a command to save the file after calling the script, or the effects of it will be lost.