How can do unique 'Client Batch ID'

Hi everybody, I want to make ‘unique field validator’ for ‘Client Batch ID’ when add new batch. How can I do this ??

You can add the UniqueFieldValidator validator to the schema field:

Dear Espurna,

Thank your for your quick reply. But I dont understand clearly. I think it before but I can not do this. Please explain much more, do I change the batch.by file ? or which file (path) must be change ?

I am so sorry for this question, thank you in advance.

Regards.

Not the best solution because you may lose your changes during updates, but it will work.

Hi,

is this a good idea, actually?
Please consider that you will get serious problems when e.g. another client serves the same ID in his request, coincidentally - maybe years later.

That’s the reason why e.g. Batch Titles were explicitely made NOT unique.
see Remove unique field validator for Batch titles · Issue #468 · senaite/senaite.core · GitHub