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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to add secondary key including the standard fields in a table extension?

(0) ShareShare
ReportReport
Posted on by 625

Hi All,

In order to create a page matrix, i need to add secondary field in Sales Line Table, with fields : Sell-to Customer No.,Type,No.  with  SumIndexFields = Amount;

But i am getting the following error : 

pastedimage1596461339963v1.png

Can someone please help me to solve this issue?

Thanks in Advance.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    Unfortunately, table extensions do not currently support 'cross-keys' from fields that are not part of the extension with the exception of the primary key.

    This means that you cannot reference non-PK fields from the 'base' table inside of a key list.

  • AXBOY Profile Picture
    625 on at

    So was it supported in previous version of Nav?

    Also is there any workaround for this situation in Business Central?

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    In C/AL you can modify the base object and so you can create the keys you want. In the extension's world (and expecially on SaaS) you cannot modify the base table. Workaround? It depends on what you have to do. Instead of using a SumIndeField maybe you can directly place a calculation in your code (OnAfterGetRecord trigger)?

  • AXBOY Profile Picture
    625 on at

    Okay,got it

    Thank u for the reply

  • Community Member Profile Picture
    on at

    Now that BC18 is released - and according to this documentation:
    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-table-keys


    It should be possible to define Keys that are eigther completely built based on fields of the table extension or the base Table.
    Just make sure you update your runtime value in the app.json to the proper version.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 570 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 390 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 220 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans