There is a script stage created to modify the batch name, but the batch name is not changed.
When navigating to Administration and Monitoring Console > Processing Monitor > Event log there are the following errors.
Error: A name cannot contain character 'x' at
Error: The name is too long. Maximum length is 90.
- The modified batch name contains forbidden characters (e.g. the ones used in Windows paths).
- The modified batch name exceeds the limit of 90 characters.
If the error is caused by the forbidden characters (e.g. slashes, colons, etc.), the name can be edited to replace these characters with an empty character or a replacement character.
var name = Batch.Documents.Field("Invoice Layout\\Name").Text;
var name_edited = name.Replace(":", "+");
Batch.Name += "_"+ name_edited;
If the error is caused by the exceeded 90-character limit, the string can be trimmed before assigning it to the batch name.
Batch.Name = batch_name.Substring(0, 90);