Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

'Number selection is canceled.' when assigning a number from a number sequence

(0) ShareShare
ReportReport
Posted on by 105

i use visual studio to create budget header using X++ in D365FO

i face this issue

Microsoft.Dynamics.Ax.Xpp.ErrorException: 'Number selection is canceled.'

in this line of number sequence

 numberSeq = NumberSeq::newGetNum(BudgetParameters::numRefBudgetTransactionId());

info(numberSeq.num()); ---- in this line 

and i'm sure there is a number sequence in the module parameter .. any help ?

  • Martin Dráb Profile Picture
    232,866 Most Valuable Professional on at
    RE: 'Number selection is canceled.' when assigning a number from a number sequence

    numberSeq.num() isn't the line that throws the error. It just calls a method (num()), which calls another method (runNumber()), which calls more methods... and somewhere a 'throw' statement is used to actually throw the exception.

    You need to look at place where the error is thrown to understand why it happens.

  • Omar Abdelhamed Dev Profile Picture
    105 on at
    RE: 'Number selection is canceled.' when assigning a number from a number sequence

    my required is create it using X++

    and number sequences is setup and i have many transactions using the number seq throw UI but when i use

    numberSeq.num() method i got the mentioned error

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: 'Number selection is canceled.' when assigning a number from a number sequence

    Hi Omar,

    Did you check if the number sequence is set up properly? Are you able to create Budget entries from the UI

  • Martin Dráb Profile Picture
    232,866 Most Valuable Professional on at
    RE: Microsoft.Dynamics.Ax.Xpp.ErrorException: 'Number selection is canceled.' Issue

    Can you please debug the code and tell us where exactly does the error gets thrown?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans