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, ...
Unanswered

CustInvoiceJour index

(0) ShareShare
ReportReport
Posted on by 1,965
Hi,

In CustInvoiceJour table, the allow duplicate No index is (InvoiceId, InvoiceDate, NumberSequenceGroup, RecId)

Can someone please explain to me the benefit of adding RecId to the index?

As RecId alone should be enough to provide uniqueness.

I know that sometimes we add fields to the index in case we have select statements where we filter by those fields alot. But i think if someone has the RecId then there won't be need to to filter on InvoiceId, InvoiceDate, NumberSequenceGroup
And I don't think there are "where" statements looking at RecId


Same thing for SalesLine
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    237,734 Most Valuable Professional on at
    You're right that if you know RecId, you don't need the other fields. But the reason for including RecId may be different. Imagine that you have a query where you filter by InvoiceId and InvoiceDate and return NumberSequenceGroup and RecId. If you have all the field in an index, you don't have to look into the table at all, therefore it's very efficient.

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 700 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 408 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans