Populate a Batch ID or Batch Name into Document Metadata¶
Legacy (Process Designer)
This page describes a script for the Modify Your Metadata activity of Process Designer. It was replaced by the Custom Step in Workflow. The script may not run as a Custom Step without changes. For new work, use the Custom Step reference.
In many instances, we've seen users need to populate the BatchID or BatchName as a piece of index metadata inside of their repository for reference.
Get Batch ID¶
batch.Documents.forEach(function (doc){
builder.SetDocumentMetadata(doc.DocumentId,"Index","BatchId",batch.BatchID);
});