Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Adding auto incremental field

(0) ShareShare
ReportReport
Posted on by

Hi All,

My form has a field named "new_siteid". The field should get auto populated onLoad with increments of 1.

For example: when a user creates a new record - site id will equal 000001.

Another record is created - site id = 000002 and so on.

Is there a way to accomplish this with js?

 

I've read somewhere to not use real time workflow method because it will not give you a unique number when you do imports or two users save a record at the same time.

 

 

Thank you,

*This post is locked for comments

  • RE: Adding auto incremental field

    Hey Guido,

    Thank you for providing the requested information.

    I noticed that if I create a record it indeed generates a correct value.

    However, If I delete the record the value for next record will not be readjusted.

    i.e: create record - siteid 000001 on save.

         create another record - siteid 000002 on save.   choose to delete same record.

         create another record - siteid 000003 on save.

    That leads to inconsistencies in my records. 

    I guess what I'm asking is there a way to fix that and ensure consistency between all records?

    Thanks again,

  • Abed Haniyah Profile Picture
    Abed Haniyah 4,285 on at
    RE: Adding auto incremental field

    You can also use this ID Generator Add-On :

    www.planetxrm.com/microsoft-dynamics-crm-2013-2011-auto-id-generator

  • Suggested answer
    Jharana Baliyar Singh Profile Picture
    Jharana Baliyar Singh 2,665 on at
    RE: Adding auto incremental field

    Hi,

    Please go through on this :

    community.dynamics.com/.../137584

    Personally I would recommend to go through workflows or plugins.Yes in real time workflow it won't validate, in this case you need to use plugin solution.

    Thanks,

  • RE: Adding auto incremental field

    Hey,

    How and what do I need to do in order to deploy this?

    Thanks

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans