Is there a way to have auto-numbering for the Account entity while using the standard import tool? I currently have a plugin to do this, but as you can see from the code below, it gets VERY inefficient as the number of accounts increases. What it's basically doing is searching through all the accounts to find the maximum number and incrementing it by 1 - the problem is that it's searching through the entire list after every new account is added.
var maxNumber = 1; foreach(var account in accounts) { int j; if(int.TryParse(account.AccountNumber, out j)) { if(maxNumber < j) { maxNumber = j; } } } Target.AccountNumber = (maxNumber + 1).ToString(); ArsOrganizationContext.SaveChanges();
I see that there are paid versions available but I was looking for non-paid solutions. Currently using Dynamics Online 2016 Update 1.
*This post is locked for comments
Figured it out. For those who would like to know, all you need to do is go to Settings -> Counter Configurations. From there, you create a new counter by indicating which entity, which field name, and then setting the parameters for the counter. Very straightforward.
Thank you for your tip Raz. I have installed the solution but there does not seem to be any documentation on how to use it. For example, I have an Account number attribute for my Account entity - I would like this to be autonumbered but I do not know how to configure this.
Hi Brian, the zip is a solution file which you import into crm, I think you may have extracted it by mistake. If you have any issues I can send you my version of the autonumber solution.
Best Wishes, Raz
Trying to download the Counter in the codeplex link but not quite sure how to install/implement it. There are three folders, "PluginAssemblies", "WebResources", "Workflows". What do I do with these?
Go to the following link and download the solution, install it in CRM and you are good to go: crm2015autonumber.codeplex.com
Other important reads:
community.dynamics.com/.../auto-numbering-through-real-time-workflows-no-customization-no-add-on
survivingcrm.com/.../auto-numbering-workflows-real-time-vs-asynchronous
Which version of CRM you are using?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156