Asked by:
AutoNumber in account entity using plugins in crm 2011

Question
-
I want AutoNumber in account entity using plugins i crm 2011 format ,i tried many example but i didn't got the solution can anyone help me out pls
Thanks in ADVANCE.
Rajjjjjjjjj
Monday, May 14, 2012 10:59 AM
All replies
-
Hi Raj,
You can try this either in plugins or in custom workflow activities.
Read this blog. This has exactly what needs to be done for auto numbering. It is for CRM 4.0, but can be used for CRM 2011.
http://crmintherealworld.blogspot.com.au/2008/12/using-workflow-to-generate-auto-numbers.html
I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.
Ashish Mahajan, CRM Developer, CSG (Melbourne)
My Personal Website: http://www.ashishmahajan.com
My Blogs: http://ashishmahajancrm.blogspot.com.au and http://ashishmahajancrm.wordpress.com
My Youtube Channel: http://www.youtube.com/user/ashishmahajanmscrmMy Linkedin: - Proposed as answer by Ashish Mahajan Technical Architect, Writer Monday, May 14, 2012 11:19 AM
Monday, May 14, 2012 11:19 AM -
Thanks for u r quick response but i m not getting it, actually i want in plugin coding can u help me
Rajjjjjjjjj
Monday, May 14, 2012 11:31 AM -
Hi Raj,
I suggest to do it the workflow way. In plugins there is no sure way to achieve this. The only way would to to directly make a ado.net call directly to the database, which is unsupported. I would advise to go for the above article and see if it works.
I hope this helps. If my responses answered your question, please mark these responses as an answer and also vote them as helpful.
Ashish Mahajan, CRM Developer, CSG (Melbourne)
My Personal Website: http://www.ashishmahajan.com
My Blogs: http://ashishmahajancrm.blogspot.com.au and http://ashishmahajancrm.wordpress.com
My Youtube Channel: http://www.youtube.com/user/ashishmahajanmscrmMy Linkedin: Monday, May 14, 2012 11:38 AM -
Hi Raj,
There could be third party tools you can search on Microsoft pinpont (dynamics marketplace). Again you will have to buy them. You can try this tool: crm2011autonumber.codeplex.com.
I hope this helps. If my responses answered your question, please mark these responses as an answer and also vote them as helpful.
Ashish Mahajan, CRM Developer, CSG (Melbourne)
My Personal Website: http://www.ashishmahajan.com
My Blogs: http://ashishmahajancrm.blogspot.com.au and http://ashishmahajancrm.wordpress.com
My Youtube Channel: http://www.youtube.com/user/ashishmahajanmscrmMy Linkedin: - Proposed as answer by Ashish Mahajan Technical Architect, Writer Monday, May 14, 2012 11:44 AM
Monday, May 14, 2012 11:44 AM -
For a robust way to do this in CRM 2011 plugins leveraging transactions you can check out http://connect.greenbeacon.com/2012/01/technical-post-implementing-robust-microsoft-dynamics-crm-2011-auto-numbering-using-transactions/ - A commenter has also provided some code examples as well.
Monday, May 14, 2012 8:31 PM -
Hi,
Please find the following link which contains autonumber solution, it will be helpfull to you.
http://crm2011autonumber.codeplex.com/
Thanks & Regards, MS CRM Consultant, V.Surya.
Tuesday, May 15, 2012 5:36 AMAnswerer -
Hi..
Same scenario , occurred in my Project. I have Done Using Downloading a solution from CODE PLEX.
Step 1: GOTO http://crm2011autonumber.codeplex.com/releases/view/64224 .
Step 2: Download autonumber solution and Goto Source Code Tab and Download the Project.
Step 3: Import That Solution .
Step 4: Open The Downloaded Project and Import In Ur VISUAL STUDIO 2010.
Step 5: Add Missing DLL.
Step 6: Goto Plugin Registration Step and Register.
Step 7: Goto your Imported Auto Numbering Solutio. In wich a Entity called "COUNTER".
Step 8: In that Counter entity create a new form and give your entity schema & field schema name. and give your prefix and select current position.
EG:
- Proposed as answer by kMAT1 Thursday, May 31, 2012 12:22 PM
Tuesday, May 15, 2012 10:09 AM -
Raj,
Be careful using the Auto Number solution suggested above since it will NOT work on multi server environment.
I'm working on the new enhanced version of CRM Auto Number which will work on multi server environment on both On-Premise and Online.
Will post the link to it in a couple of days.
Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits
- Proposed as answer by Dimaz Pramudya (www.xrmbits.com) Tuesday, May 15, 2012 1:31 PM
Tuesday, May 15, 2012 1:31 PM -
Raj,
You can download the new Auto Number solution from http://advcrm2011autonumber.codeplex.com/
It is much more advanced than the other one suggested in this post.
Let me know how it goes.
Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits
- Proposed as answer by Dimaz Pramudya (www.xrmbits.com) Monday, May 21, 2012 3:35 AM
Monday, May 21, 2012 3:35 AM -
From what I can tell, Dimaz's new solution should work in all cases - if you want to 'roll your own' I believe the locking/numbering approach used in this updated codeplex solution is similar to the one discussed here - http://connect.greenbeacon.com/2012/01/technical-post-implementing-robust-microsoft-dynamics-crm-2011-auto-numbering-using-transactions/
Dimaz - will the source to this component be put up on CodePlex as well?
Thanks!
Ken
Thursday, May 24, 2012 4:12 PM -
workflow or plug-in can resolve you issue.
Friday, May 25, 2012 5:30 AM -
the above answers can't resolve concurrency issue, the best way to complish auto number is use a table to store the prefix, current number information;
each time use this method to add writeLock to the table;
Thursday, May 31, 2012 6:24 AM -
CRM Develope Group,
Have you tried the solution above? There are multiple ways to achieve the same thing. The solution proposed above does similar thing as writeLock to a table.
Even so, your solution to use "writeLock" will not work on CRM Online. So it's not really a solution if you want to do this on CRM Online.
Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits
- Edited by Dimaz Pramudya (www.xrmbits.com) Thursday, May 31, 2012 6:36 AM
Thursday, May 31, 2012 6:35 AM -
This solution is fantastic!!!
Users: Dont forget to added security role (I worked this out the hard way)
Thanks so much Dimaz
Thursday, August 2, 2012 1:07 AM -
Is it possible to format the number
eg 50,001 instead of jus being 500001
Thursday, August 2, 2012 1:17 AM -
Disclaimer: I work for North52, and we have both free (community edition) & paid options on our product.
As part of N52 Formula Manager we have an auto number function which will resolve your issue & you don't need any coding. The best bit is that there is a free community edition available so you can deploy to production environments for free.
Here's a link to a video showing how it works & the formatting of the number is completely flexible.
http://www.youtube.com/watch?v=72aCs1a78BE
Those looking for specifics on the algorithm we use can read the blog post below which is very similar to what we do internally.
John
John Grace, Founder at North52 www.north52.com
Saturday, September 8, 2012 12:21 PM -
Hello Raj Go through the below link.
http://martinsant.net/?page_id=288
HTH
saroj
- Edited by Saroj kumar Das Wednesday, January 16, 2013 6:45 AM
Wednesday, January 16, 2013 6:45 AM