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 :
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 607

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.

I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 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
    607 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,166 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
    607 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

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans