"Cannot modify batch structure from this script" error in batch processing script

I'm getting a "Cannot modify batch structure from this script" error from a batch processing script in a Batch Type custom workflow script. The script used to work in a previous version of Flexicapture we have running in production ( but is failing in Also, the project in prod is a General project, whereas the new one I'm working on is a US Invoice project. I've ensured that the script running is a Batch Processing script. The script throws the error when attempting to call the batch.CreateDocumentFromPage(...), where batch is IBatch instance. I have also noticed that this error only happens when the workflow is part of a batch type, it does not happen when set in a workflow at the project level.

And yes, I've submitted a support ticket but have heard nothing beyond they could not replicate even though I can replicate easily with a bare-bone project. Did anything change in permissions between versions that would now cause this to fail?

Was this article helpful?

0 out of 0 found this helpful



  • Avatar
    Scott Chau

    Not sure if you are getting the ticket notification response.  Maybe check your spam folder.  I see in the ticket, Nikita mention the following:

    Please modify your code. The problem is related to a Batch. Documents.

    IDocuments batchDocs = Batch.Documents;

    The right code is next:

    IDocuments batchDocs = Documents;

    Please modify other lines as well.

    The article is available for signed-in users.

  • Avatar

    Hi Scott, I did indeed see Nikita's comment on the ticket and it solved the problem. Thanks for following up here too!


Please sign in to leave a comment.