web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Number sequence generation

(0) ShareShare
ReportReport
Posted on by 50

Hi all,

I  have a custom table say "XXXTable"

where field "RequestNumber"  is mandatory - for which number sequence will be assigned

Scenario:

  i am creating web service;where i assign all the field values

  and ill do all the validations (including validate field, validate write) ; once if all the validations succeeded the record should be created

  Problem is since the "RequestNumber" is mandatory  i need to assign the number sequence value to it ; therefore if the user creating the records multiple times with error then  number sequence will be used for that many error records;

NEED:

1. when i create a record with invalid data - number sequence value should be in free list (say number sequence value is HMA_003)

2.  when i create a record with invalid data - number sequence value should be in free list 

2. When i create a record with valid data - number sequence should use the value from free list (HMA_003 should be useD rather than using the value HMA_005)

I have the same question (0)
  • A.Prasanna Profile Picture
    8,223 on at

    So simply you asking ,

    if the record is properly validated you need to use Original Number Sequence ,  and if your record has not pass the validation you still need to retain that records , but with another number sequence is it ?

    Regards,

    Amith Prasanna

  • Hasini N Profile Picture
    50 on at

    yes am using original number sequence only ..but i should not use another number sequence.is there any other alternative solution

  • Suggested answer
    A.Prasanna Profile Picture
    8,223 on at

    I think you better add Flag (Status) based on Validation result , while keeping original number sequence

    By using that you can filter record easily and same time you can use that flag for later use (eg: for Workflow to reset and resubmit ).

    Hope this will help.

    Thanks ,

    Amith Prasanna

  • Hasini N Profile Picture
    50 on at

    are you asking me to use 2 number sequence

  • Suggested answer
    A.Prasanna Profile Picture
    8,223 on at

    No just to add field for the Status ( Eg; base Enum with Valid /Invalid values)

  • Hasini N Profile Picture
    50 on at

    Thanks for the reply

    the thing is " ill call the validate write in the validation part ; since the request number is mandatory field.if i dont assign the value for the request number. error will be thrown in the validatewrite() method itself"

  • Suggested answer
    A.Prasanna Profile Picture
    8,223 on at

    Okay. Mean you are not assign any number for Request Number Initially , But Request Number is Mandatory ?

    if that is the case, it think you can either assign another number sequence Temporarily, and  upon validation you can update record from original no sequence or   you can assign number from your original Number Sequence but with Status Flag ( Eg : Valid /Not Valid)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans