This project is read-only.

Installation

Download the curent release and import the managed (or unmanaged) CRM solution to your CRM Online or CRM On-Premise development or test organization. If you import the unmanaged solution dont forget to publish the customizations.

Configuration

The solution is fully preconfigured so that you can immediately start testing it. The preconfiguration is for development and/or testing only and will assign a autonumber to the "description" field if you create a new account or contact. The number (which is actually more an identifier) will look like "AC-0000012301" or "CO-0000000122". 

To change the configuration and/or enable other entities you have to open the Plugin Registration Tool which is part of the CRM SDK (bin/pluginregistration.exe). Start the Plugin Registration Tool and connect it to your organization (to which you have imported the CRM solution in the step above).

Locate the Pta.TrueUniqueAutonumberCreator.Plugins.TrueUniqueAutonumberCreatorPlugin and have a look on the configured steps. You see two preconfigured steps which have the following characteristics:

  • Message: Create
  • Run in users context: Calling User
  • Stage: Pre-operation
  • Execution Mode: Synchronous
  • Deployment: Server only
  • Unsecure configuration: Something like bucketname=CO;apikey=demo;autonumberattribute=description;startvalue=500

To enable entities for autonumbering create new steps like described above and set Primary Entity to the entity for which you want to enable the functionality.

The Unsecure configuration is important. Specifically, you have to provide a string with 4 key/value pairs, each separated by a ";" (semicolon). The key and the value are each separated by "=" (equality sign). The four key names are:

  • bucketname: the prefix for the autonumber. Can be chosen arbitrarily.
  • apikey: the key which authenticates you for the webservice. For testing use "demo", for production use you have to contact me to receive your productive apikey.
  • autonumberattribute: the name of the attribute/field of the entity which stores the autonumber. This must be a single- or multilinetextfield.
  • startvalue: positive integer specifying where to start numbering. This is only honoured once, when the bucket is not yet initialized.

Example: You have a custom entity with the name yours_instrument for which you want to enable the autonumber functionality. The autonumber should be stored in a field with the name yours_instrumentnumber and have strat with number 1000 and have to look like "INST-0000000122". To archieve this create a new step like described above with the Primary Entity  yours_instrument. The Unsecure configuration then look like this.

bucketname=INST;apikey=demo;autonumberattribute=yours_instrumentnumber;startvalue=1000

 Plugin Registration Example

Download bigger image

Note: The plugin assembly is preconfigured to run in the sandbox. For On-Premise deployment you can choose between sandbox or non-sandbox (None) deplyoment.

Number range

The supported number range for each bucket/apikey combination is from 0 till 2147483647. If the maximum is reached any further attempt to get the next number for this bucket/apikey combination will result in an "sequence exceeds" exception. 

Get a valid api key for production

Please send an e-mail to hendrik (dot) saly (at) pta.de and ask for an apikey.

The numbers are guaranteed to be true unique per bucketname and its also guaranteed that the next number is always higher than the last number. Its however not guaranteed that the numbers are strictly subsequent (for example your last number was 500, the next is 501 and then the next could be 504 ...)

The webservice serving the autonumbers is currently exposed via http://ptahs1.cloudapp.net/DBSequenceService.svc

Warning: The "demo" apikey or any other apikey not dedicated to you is not for production use and it maybe happen that the key will be discontinued/blocked and/or recessed.

Disclaimer for the apikey and webservice which provides the global unique numbers:

THE SERVICE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE PROVIDORS, AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SERVICE OR THE USE OR OTHER DEALINGS IN THE SERVICE.

Last edited Jul 1, 2013 at 10:02 PM by salyh, version 13

Comments

No comments yet.