Security Roles

Users who you would like to have access to the PowerAutoNumber solution should be assigned the PowerAutoNumber User Role security role. If you would like a user to be able to create new PowerAutoNumber rules they should be assigned the PowerAutoNumber Admin Role security role.

Configuring AutoNumber

This guide will walk you through how to configure and use the PowerAutoNumber add-on for Microsoft Dynamics CRM. Once you have imported and registered the PowerAutoNumber add-on it will need to be configured under the registration screen. Configuring PowerAutoNumber will allow you to choose which Azure cloud location you want your AutoNumbers generated from.

To configure PowerAutoNumber navigate to the setup tab, click on the dropdown arrow and select your desired Azure cloud location, this is where all of your AutoNumbers will be generated from. Make sure you click save when you are finished.

Note: Once you've created auto-number records, the Target Service dropdown will no longer expand. If you want to change your Target Service later on, you can use the Deployment Wizard, by clicking the "Deploy" button, next to the Setup tab.

Using a Custom Service

For organizations who want to host their own service instead of using Azure, a custom service can be configured in the PowerAutoNumber solution. Configuring custom services is not included in the free PowerPack support scope, but our friendly support desk would be able to help.

Redeploying Auto Numbers

If you need to move your auto numbers to a new cloud or you’ve copied your instance, you’ll need to deploy the auto numbers from the Setup tab. Start by selecting the Deploy button to initiate the Deployment Wizard.

Once the wizard opens, you are presented with options to Select New Cloud or Redeploy PowerAutoNumber Definitions. The Select New Cloud will allow you to choose another Azure database to use (remember you can use only one database at a time). If you copied or migrated your CRM instance, selecting the Redeploy PowerAutoNumber Definitions will recreate your auto numbers for use with your new CRM instance.

Creating an AutoNumber Rule

Once you’ve configured PowerAutoNumber, navigate to the PowerPack section of your CRM system and click on PowerAutoNumber. To create a new PowerAutoNumber, click on New in the upper left corner.

On the new PowerAutoNumber Rule you will want to select which entity (Target Entity) and which field (Target Attribute) that you would like to create an AutoNumber for. The Name, Attribute Type, and Max Length will be automatically populated based on the Entity and Field you have selected.

Placeholder Value

The placeholder field is a critical field on the AutoNumber Rule. The value defined in the placeholder field can be used to flag records for CRM’s bulk update process, for the purpose of retroactively generating unique identifiers. This value will automatically appear in the defined field; should your PowerAutoNumber license expire or if the connection to the Azure cloud fails. This field should hold a unique value and no two PowerAutoNumber Rules should have the same Place Holder Value. Additionally, we always suggest including brackets around the field value.

Only on Update

PowerAutoNumber allows you to check the “Only on Update” checkbox, so that AutoNumbers are only created when a record is updated, instead of when the record is initially created. This check box is un-checked by default, so that, by default the AutoNumber will be created when the record is first saved.

PowerAutoNumber Definitions

When creating a PowerAutoNumber there are a number of different elements you can choose from.

Sequential Numbers
If you’d like to number a field using sequential numbers, you will use the {a:n} token, where “a” stands for AutoNumber and “n” is the length of the AutoNumber you’re looking for. For example, if you put {a:5} and set the Initialize Number to 5, your first AutoNumber will be 00005. These AutoNumbers are guaranteed to be unique.

Note: If you put {a:03} in your AutoNumber field your AutoNumber will not be padded with a 0. It will just be 3 digits long.

If you’d like to use a date in you AutoNumber field you will use the {d:n} token, where “d” stands for date and “n” will be replaced by the format of the date you’re wanting to insert. The date that will be entered into this AutoNumber field is the date when the record was created in the time zone that your CRM server is running in.

For example, {d:mm/dd/yyyy} will insert the date in the following format 05/15/2015. If you’d like to display the day first, your format would be {d:dd/mm/yyyy}.The format {d:mmmm dd,yyyy} will insert the date written out May 15, 2015. Another example of a date AutoNumber could be {d:dd-mm-yy} which would insert the date in the following format 05-15-15.

If you’d like to use a time stamp in your AutoNumber field, you will use the {t:n} token where “t” stands for time and “n” will be replaced by the format of the time you’re looking to insert. The time that will be entered in the field is the time that the record was created, in the time zone that your CRM server is running in. You can use “hh” for hour, “mm” for minute and “ss” for seconds. So, for example, {t:hh:mm:ss} will insert the time 08:15:45 into the AutoNumbered field. The format {t:hh:mm} will insert the time 08:15 into the AutoNumber field. The time displayed here will be based on a 12 hour clock. If you would like to insert AM or PM into the field, simply add “tt” within the end of the {}, so it would be formatted {t:hh:mm:ss tt} and would appear 08:15:23 AM.

Random Letters
If you’d like to use random letters in your AutoNumber field, you will use the {r:n} token, where “r” stands for randomized letters, and “n” will define the number of random letters you would like in your field. For example, if you use the token {r:5} will get KDNVK (or some random letter sequence) in your AutoNumbered field. The letters will always be capital letters, and letters will be A-Z. These random letters are not guaranteed to be unique.

Field Values
If you’d like to use CRM fields in your AutoNumber field you can do that as well. For this, you will use the {f:n} token, where “f” stands for field, and “n” will be replaced by the logical name of the field you are looking to insert. For example, if you want to insert the First Name field, your token would say {f:firstname}. The field you are using must be on the same record as the entity you are inserting the AutoNumber into. For example, if the entity of your AutoNumber is “Account”, you can only pull fields in from the account entity.

Note: PowerAutoNumber does not support lookup fields, the field must be a string.

If you’d like a constant prefix or suffix on your AutoNumber you would simply type the character outside of your AutoNumber token. Any character that is placed outside of the AutoNumber token will appear as a literal value in the generated AutoNumber value. For example, if you’d like the letter “A” in front of all of your account numbers you would put A-{a:4} in your field format field and get an autonumber similar to A-2356.

Complex Formats
If you’d like to use more than one type of AutoNumber in a field, you would simply insert more than one token. For example, if you’d like a CRM field name and a random date you would use the tokens {f:n}-{a:n}, so if you used {f:firstname}-{a:5} you would get something similar to Jim-52369 in your AutoNumber field.

Type of AutoNumber Format Initial Number Result
Sequential Numbers
{a:5} 0 00001
{a:10} 12000 0000120001
{d:mm/dd/yy} 0 06/18/12
{d:mmmm dd, yyyy} 0 June 18, 2012
{d:dddd mmmm dd, yyyy} 0 Monday June 18, 2012
{t: hh:mm tt} 0 11:02 AM
{t: hh:mm:ss tt} 0 11:02:34 AM
Random Letters
{r:5} 0 ADFRD
Field Values
Account Number {f:accountnumber} 0 234589
Account Name {f:name} 0 PowerObjects
A#{a:5} 0 A#00001
Date:{mm-dd-yy} 0 Date:06-14-12
Complex Formats
{a:5} - {r:5} 0 00001 - JEIFK
{a:3} - {f:accountnumber} 250 250 - 56230
{f:address1_city}, {f:address1_state} {f:address1_postalcode} 0 Minneapolis, MN 55441
{d:mm/dd/yy} at {t:hh:mm tt} 0 06/14/12 at 11:17 AM

Note: When you are done formatting your field, click Save & Close.

Using PowerAutoNumber

Once you have set up a definition as shown in the steps above a PowerAutoNumber will automatically be created when an entity is created or if the “Only on Update” check box is selected, when a record is updated.  Note: PowerAutoNumber will not overwrite a value, if there is already a value in that field.

If you would like to pause the AutoNumbering of records, simply deactivate the PowerAutoNumber record and the numbering will pause. Once the PowerAutoNumber rule is reactivated the AutoNumbering will resume where it left off.

How to Update Records Using the Placeholder Field

As mentioned earlier in this user guide, the placeholder field will allow users to update records that are already saved in CRM. PowerAutoNumber creates AutoNumbers when a record is first saved, however, most users will already have records saved in their CRM that they’d like to update with this AutoNumber as well.

To update pre-saved records in CRM, navigate to the view of the records you’d like to update. For this example, let’s say we want to update the account number field on all pre-existing accounts. First, you would go to the ‘Account Number AutoNumber Rule’ and make sure a placeholder value is set.

After this, go to the Account section in CRM, change the view to “Active Accounts,” select all of the active accounts in the view, and select Edit.

In the Account Number field, type the placeholder value of this particular AutoNumber; in this case it is {acct nmbr}.

Note: If you have changed the field to read-only, you will need to change it to Write & Read so that you can type in the placeholder value.

Then click Change and all of the AutoNumbers that were selected will be updated.

Note: If there are records selected that are already AutoNumbered, the field will be re-numbered in this bulk edit.

Using PowerAutoNumber in new UCI

PowerAutoNumber is compatible with the Dynamics 365 online UCI. Make sure you have the UCI compatible version downloaded from our website and installed in your CRM.

Once you have PowerAutoNumber installed you can to add it to your sitemap, along with the entities and web resources the solution provides by editing an app and adding the components in your app designer.

Uninstall PowerAutoNumber

To uninstall, first delete any PowerAutoNumber rules you created. Then uninstall as usual, by deleting the solution.

Deleting these rules will not remove the existing autonumbers that have been populated into your records, but future records will not be populated with an autonumber.

Uninstalling the solution does not unsubscribe the solution.  If you're discontinuing use of the add-on, you must first unsubscribe in the solution.

Thank you for your interest in PowerAutoNumber, should you choose to subscribe you will be charged $1.50/enabled CRM user/month. If you have any questions or run into any issues with PowerAutoNumber, our friendly support team is here to help!

PowerAutoNumber User Guide