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 get a source expression from another table extension

(0) ShareShare
ReportReport
Posted on by 485

I am trying to add a column from a custom field to my report extension. I created the custom field using a table and page extension.

More specifically, I made the two custom fields to extend the Company Information page, and I trying to add those fields as columns to a report extension that extends a Sales Invoice Report.

If you look at this screenshot below, you can see "SourceExpression" as a second parameter to the column function:

Screen-Shot-2022_2D00_05_2D00_16-at-9.48.30-AM.png

When I try adding the field name I want (the custom fields) for the SourceExpression, intellisense does not recognize it, and I get a problem saying that "the field does not exist in the current context".

How do I make the field available in the current context?

Thanks,
J

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

    Hi,

    Define Company information as a Global Variable in sales invoice Report extension, and than add fields from company information table as a column under in  header dataset.

    because we are defining companyinfo5 as a new variable than use a GET command to fetch record from database.

    dataset

       {

           // Add changes to dataitems and columns here

           add("Sales Invoice Header")

           {

             column(BankName;CompanyInfo5."Bank Name")

             {

             }

           }

           modify("Sales Invoice Header")

           {

               trigger OnBeforePreDataItem()

               begin

                  CompanyInfo5.get;

               end;

           }

       }

       var

       CompanyInfo5: Record "Company Information";

    Rereads,

    Alok

    Please verify if you find my answer helpful

  • jdrco Profile Picture
    485 on at

    This works! Thank you for your help.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,024 Super User 2026 Season 1

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,024 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,383 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans