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

Notifications

Announcements

Community site session details

Community site session details

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

NumberSequenceTablerListPage Records

(0) ShareShare
ReportReport
Posted on by 126

Hi,

I have one requirement. i want all the records which are coming on Number Sequence form(Form Name : NumberSequenceTablerListPage). I can export records directly from the form into excel, but my requirement is different, so that export solution won't work for me. I need to write the code so that i can fetch same number of records which are coming on form.

can anyone please suggest me , what code i can write to fetch the same records which are coming on form.
Path : Organization Administration > Common  > Number Sequence

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    238,538 Most Valuable Professional on at

    Are you saying that you don't know how to write code counting records at all, or that you have a problem with this particular data?

    The source of data for this form is NumberSequenceTable.

    The simplest way to count records is this:

    NumberSequenceTable numSequence;
    
    select count(RecId) from numSequence;

  • D365_FO_Technical_Te Profile Picture
    126 on at

    Hi Martin,

    Thanks for your quick response.

    I know how to write code counting records.

    But the issue is the number of records coming on NumberSequenceForm are different from the number of records we are getting from below code.

    NumberSequenceTable numSequence;

    select count(RecId) from numSequence;

  • Martin Dráb Profile Picture
    238,538 Most Valuable Professional on at

    No problem. Look at filters used by the form and add them to your query.

  • D365_FO_Technical_Te Profile Picture
    126 on at

    I have already checked those filters, i tried with that code. still i am not getting correct output. So need help on that point only.

  • Martin Dráb Profile Picture
    238,538 Most Valuable Professional on at

    I'm sorry, but I can't just tell you how to get "correct output" without more information from you.

    How do you count records in the form? Which number is higher? Do you have an example of a difference?

    How did you identify the filters and what code did you use to apply them? Have you verified that the resulting query is the same as the one in the form?

  • D365_FO_Technical_Te Profile Picture
    126 on at

    Firstly from the form, i export the record into excel. And in the excel, i check the count for the records on excel which are coming on form.

    Then, secondly i write the code and then i check the count.

    Both count were different.

  • D365_FO_Technical_Te Profile Picture
    126 on at

    sorry for the incomplete answer.

    i write the code on SQL, below is my code

    select * from NumberSequenceTable NST

    Left Join NumberSequenceScope NSS

    on NST.NumberSequenceScope = NSS.Recid

    Left Join FiscalCalendarPeriod FCP

    on nss.FiscalCalendarPeriod = FCP.recid

    left Join FiscalCalendarYear FCY

    on FCP.FiscalCalendarYear = FCY.recid

  • Martin Dráb Profile Picture
    238,538 Most Valuable Professional on at

    Please always you Insert > Code to paste source code; it'll be much easier to read and refer to:

    select * from NumberSequenceTable NST
    left join NumberSequenceScope NSS
    	on NST.NumberSequenceScope = NSS.RecId
    left join FiscalCalendarPeriod FCP
    	on nss.FiscalCalendarPeriod = FCP.RecId
    left join FiscalCalendarYear FCY
    	on FCP.FiscalCalendarYear = FCY.RecId

    This clearly SQL, not X . When you write SQL, you must manually do what F&O normally does for you: filtering by Partition and (in most cases, but not this one) DataAreaId.

    Those left joins are irrelevant, because they don't filter records in NumberSequenceTable.

    Note that my previous replies more leads for isolation of the problem.

  • D365_FO_Technical_Te Profile Picture
    126 on at

    After seeing the result, i also feel that left Join is irrelevant. But after removing left join also, my count are not matching with the records coming on form.

    And i have tried your previous code also, with that also count is not matching with form records.

  • Martin Dráb Profile Picture
    238,538 Most Valuable Professional on at

    As you see, you can't fix the problem without finding out first what's wrong. I gave you some suggestions; consider following them.

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 444 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 288 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans