Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to implement auto incremental field?

Posted on by 515

Hello,

I want to create a field in which values automatically inserted in sequence numbering and always unique. I have gone through several articles and I found that there are several ways to archive it. I wanted to go for plugin way. I tried to import below two plugins to my dynamics 365 online environment.

crmnumbering.codeplex.com

https://advcrm2011autonumber.codeplex.com/

but in both the case I am getting error like this while importing solution  - https://www.screencast.com/t/aIVSRtqHwjl

I tried various solution to fix it but not succeeded, is there any better solution to achieving auto numbering field?

Regards,

Ashish

*This post is locked for comments

  • Inogic Profile Picture
    Inogic 24,094 on at
    RE: How to implement auto incremental field?

    To achieve the Auto Number you can follow below steps

     1)      Create custom entity i.e. “Auto Number” Entity with fields “Seed Value” ,” Next Number” etc. Create one record of this entity with Seed Value=1 and Next Number=0

    2)      Create custom entity i.e. “Auto Number Locker” entity . Create one record of this record.

    3)      Develop a plugin which will set auto incremental field. In plugin follow below steps:

    •  Send update request for “Auto Number Locker” entity record. You just need to update any field with any hard coded value of that record. Since, if multiple user sends request to generate the Auto Number then this “Auto Number Locker” record update request will be in queue and we will get unique number.
    • Retrieve the latest number(Next Number field value) from “Auto Number” record and increment it by 1 (Seed Value field value)
    • Now set this incremented value in your auto incremental field.
    • Finally, update the incremented value in “Next Number” field value of “Auto Number” record again.

     

    If this answered your question, please make sure to Mark this as an Answer.

    Thanks !

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: How to implement auto incremental field?

    Hi Ashish,

    Try using different browsers and then import the solution.

    If the problem still persists, then follow the solution in the link below.

    nishantrana.me/.../an-error-has-occurred-1-0-while-importing-solutoin-in-crm-2016-online

    You could also try using the following autonumbering solution

    crm2015autonumber.codeplex.com

    dynamicscrmcoe.com/auto-number-generation-dynamics-crm-2016

    Hope this helps.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to implement auto incremental field?

    I will recommend you to debug the solution using CRM 2016 Plugin Registration Tool first. Please check your are using the CRm 2016 SDK reference assemblies and your .net version is 4.5.2

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to implement auto incremental field?

    Looks like you are using Dynamics 365 and I think these are not supported for Dynamics 365. You can generate unique number using system workflows as well. Check this link

    survivingcrm.com/.../auto-numbering-workflows-real-time-vs-asynchronous

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans