Bhubaneswar, Odisha, India
+91-8328865778
support@logyscal.com

Auto numbering in Dynamics 365 Customer Engagement

Auto numbering in Dynamics 365 Customer Engagement

Auto numbering feature has always been there in the Dynamics CRM application settings, but it was restricted to a few entities such as contracts, cases, articles, quotes, and so on.

If we click Settings -> Administration -> Auto-Numbering option, we can see the auto numbering configuration panel with existing entities as below:

Previously we could configure auto-numbering for some predefined entities such as, Contract, Cases, Articles, Quotes, Orders, Invoices, Campaigns and so on. But in Dynamics 365 we can create Auto-Numbering for all other entities also. We can do this using SDK only there is no visual editor available. Xrm Toolbox has a plugin which can do this using UI.

The below code is the sample code to create a Auto-number in Contact entity.

CreateAttributeRequest createAttributeRequest = new CreateAttributeRequest(); createAttributeRequest.EntityName = “contact”; var autoNumberAttributeMetadata = new StringAttributeMetadata() { //”CUST” is a custom string that we want to prefix with the sequence. //{SEQNUM:size} – Size of the sequence number //{RANDSTRING:size} – Size of the random string to be generated //{DATETIMEUTC:format}- Format for the date time //”new_contactsequence” is the attribute to hold the auto-number AutoNumberFormat = “CUST – {SEQNUM:4} – {RANDSTRING:4} – {DATETIMEUTC:yyyyMMddhhmmss}”, SchemaName = “new_contactsequence”, MaxLength = 100, RequiredLevel = new AttributeRequiredLevelManagedProperty( AttributeRequiredLevel.ApplicationRequired), DisplayName = new Microsoft.Xrm.Sdk.Label(“Customer Sequence”, 1033), Description = new Microsoft.Xrm.Sdk.Label(“This is contact seq”, 1033) }; createAttributeRequest.Attribute = autoNumberAttributeMetadata; var response = organizationService.Execute(createAttributeRequest);

The sample sequence will look like : CUST-1000-Y1K1-20200101022119

AutoNumberFormat valueExample value
CAR-{SEQNUM:3}-{RANDSTRING:6}CAR-123-AB7LSF
CNR-{RANDSTRING:4}-{SEQNUM:4}CNR-WXYZ-1000
{SEQNUM:6}-#-{RANDSTRING:3}123456-#-R3V
KA-{SEQNUM:4}KA-0001
{SEQNUM:10}1234567890
QUO-{SEQNUM:3}#{RANDSTRING:3}#{RANDSTRING:5}QUO-123#ABC#PQ2ST
QUO-{SEQNUM:7}{RANDSTRING:5}QUO-0001000P9G3R
CAS-{SEQNUM:6}-{RANDSTRING:6}-{DATETIMEUTC:yyyyMMddhhmmss}CAS-002000-S1P0H0-20170913091544
CAS-{SEQNUM:6}-{DATETIMEUTC:yyyyMMddhh}-{RANDSTRING:6}CAS-002002-2017091309-HTZOUR
CAS-{SEQNUM:6}-{DATETIMEUTC:yyyyMM}-{RANDSTRING:6}-{DATETIMEUTC:hhmmss}CAS-002000-201709-Z8M2Z6-110901
You can enroll now !We are giving 30% discount on our Internship Program

Don’t miss the chance to participate in the upcoming Internship Program which will be done using Microsoft Dot Net Web Development Full Stack Technology. The new batch will be starting from May 20, 2024.  We will have most experienced trainers for you to successfully complete the internship with live project experience.

Why to choose Our Internship Program?

Industry-Relevant Projects
Tailored Assignments: We offer projects that align with your academic background and career aspirations.
Real-World Challenges: Tackle industry-specific problems and contribute to meaningful projects that make a difference.

Professional Mentorship
Guidance from Experts: Benefit from one-on-one mentorship from seasoned professionals in your field.
Career Development Workshops: Participate in workshops that focus on resume building, interview skills, and career planning.

Networking Opportunities
Connect with Industry Leaders: Build relationships with professionals and expand your professional network.
Peer Interaction: Collaborate with fellow interns and exchange ideas, fostering a supportive and collaborative environment.

Skill Enhancement
Hands-On Experience: Gain practical skills and learn new technologies through project-based learning.
Soft Skills Development: Enhance communication, teamwork, and problem-solving skills essential for career success.

Free Demo Class Available