In Vault 2020 functionality to develop a custom numbering provider has been added which is great! The INumberProvider interface gives a NumberProviderRequest as an input to the custom provider. The input can be combined with your own logic and on the end the GenerateNumbers function is returning a NumberProviderResponse which holds the newly generated number(s).
The NumberProviderRequest gives access to the fields which are used to create a custom naming scheme using the custom number provider, but if the custom naming scheme has an auto-sequence field, this field doesn't return any value. Although I understand the custom number provider is completely responsible to generate a number, I would like to request a change to the functionality to get an auto generated number from the auto sequence field. This would allow to modify the request, for example, to add delimiters to the auto generated number. (0000001 --> 00.00.01), which isn't possible using the OOTB numbering schemes. Delimiters can be added in a scheme, but auto generated numbers don't go 'over' the delimiter.
Example to receive the value of a field from the the request:
This one is working properly:
string wg = request.Fields.Where(x => x.Type == FieldType.WorkgroupLabel).FirstOrDefault().Value;
This one doesn't return a value: (can this be modified in future versions of Vault 2020?)
string autoNumber = request.Fields.Where(x => x.Type == FieldType.Autogenerated).FirstOrDefault().Value;
Sample of the custom numbering scheme using the custom number provider:
Can't find what you're looking for? Ask the community or share your knowledge.