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...
Answered

How to add field from custom table as a column to a report extension?

(1) ShareShare
ReportReport
Posted on by 481

I am trying to add a column on my report extension that is linked to a field from a custom table I made.

The custom table is called "Program"

Here is how I am trying to do it:

Screen-Shot-2022_2D00_05_2D00_18-at-9.09.06-AM.png

Screen-Shot-2022_2D00_05_2D00_18-at-9.10.23-AM.png

But I get this error:

The Program does not exist. Identification fields and values: Program Code='', ID=0.

This is the way I have been grabbing fields from default tables onto my report extension, so is there anything different I have to do since this time I am trying to access a field from a custom table?
How would I go about accomplishing this requirement?

Thanks,

J

I have the same question (0)
  • Suggested answer
    Alok.kulshreshtha Profile Picture
    934 on at

    hi,

     you are fetching a record from Programecard table using GET command with reference to same table . which is wrong. if programcard primary key value is in  header table than it should be like

    ProgrameCard.get(Header."Field i wnat")

    also get command need to move to onaftergetrecord trigger for header

    Regards,

    Alok

    Please Verify my answer if you find my post helpful.

  • jdrco Profile Picture
    481 on at

    Hi @Alok Kulshreshtha,

    I am still confused as to what table to reference in my GET command. It appears that "Field I Want" is only in the table ProgramCard. How do I check if the primary key value is in the header table? Right now "Field I want" isn't available in the header table when I try referencing it like you said (Header."Field I Want").

    Thanks,

    J

  • Suggested answer
    Nitin Verma Profile Picture
    21,788 Moderator on at

    Hi,

    Better if you please follow the below link to understand the report creation

    docs.microsoft.com/.../devenv-howto-rdl-report-layout

  • jdrco Profile Picture
    481 on at

    Thanks for this, unfortunately the requirement I have is a bit more abstract than what is explained in the docs.

    Is there a a site or service where I could get live on-call help regarding this AL implementation?

  • Suggested answer
    Alok.kulshreshtha Profile Picture
    934 on at

    Hi,

    When i say , "Field I Want" in header, I am actually referring a  value in "Field I want".

    so the value in ProgramCard."Field i want" is exist in any column in header table? if yes than use that field in place of

    "Field I want" in ProgrameCard.get(Header."Field i want")

    Regards,

    Alok

    Please Verify my answer if you find my post helpful.

  • Verified answer
    Giambattista Malvasi  Profile Picture
    195 on at

    You can use trigger OnAfterAfterGetRecord()

  • jdrco Profile Picture
    481 on at

    How do I deal with using SetRange to target the field?

  • Giambattista Malvasi  Profile Picture
    195 on at

    What is the Record of the DataItem "Header?"

  • jdrco Profile Picture
    481 on at

    It is a Record of "Sales Invoice Header"

  • Giambattista Malvasi  Profile Picture
    195 on at

    Were is the connection from "Sales Invoice Header" to "program Card"?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,965 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,125 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 961 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans