Ardalyst / Celedon-Autonumber-RTM

Celedon Autonumber Solution for Dynamics CRM
http://www.celedonpartners.com
MIT License
19 stars 24 forks source link

Added support for pulling from a pre-generated list of numbers instead of on the fly #22

Closed wedge206 closed 6 years ago

wedge206 commented 6 years ago

This code update will allow the autonumber solution to pull numbers from a pre-generated list of numbers, instead of generating on the fly.

Description of functionality:

  1. At config time: SysAdmin configures a number to use PreGenerated numbers. Then they must manually create the numbers, or import from an excel list, or insert via API
  2. At runtime: the GetNextNumber plugin will check if an autonumber is configured to use a list.
    a) If yes: Then it will filter just the Active numbers in the list, and sort by the ordinal, and take the first number in the list. Once a number is used, it is deactivated. If there are no available numbers, then an error is thrown (sys admin is responsible for ensuring that numbers never run out). b) If no: Then normal number generation is used

You will need to update the base solution: Update cel_autonumber entity:

Create new entity "cel_generatednumber":

Not implemented in this pull request, but potential additions:

tsharp commented 6 years ago

Cool - we will add this to the the solution! Ty for your commit!