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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Extending FreeTextInvoice report

(0) ShareShare
ReportReport
Posted on by 235

Hello,

I'm new to D365 F&O extensions development. I'm attempting to extend our FreeTextInvoice report and I'm having issues:

I've created a PostHandler for the report as follows:

internal final class FreeTextInvoiceEvents
{
/// <summary>
///
/// </summary>
/// <param name="args"></param>
[PostHandlerFor(classStr(FreeTextInvoiceDP), methodStr(FreeTextInvoiceDP, processReport))]
public static void FreeTextInvoiceDP_Post_processReport(XppPrePostArgs args)
{
FreeTextInvoiceDP dpInstance = args.getThis() as FreeTextInvoiceDP;
FreeTextInvoiceHeaderFooterTmp freeTextInvoiceHeaderFooterTmp = dpInstance.getFreeTextInvoiceHeaderFooterTmp();
FreeTextInvoiceTmp freeTextInvoiceTmp = dpInstance.getFreeTextInvoiceTmp();

CompanyInfo companyInfo = companyInfo::find();

ttsbegin;
while select forUpdate freeTextInvoiceHeaderFooterTmp
{
freeTextInvoiceHeaderFooterTmp.amtRemitToAddress = DirParty::getPostalAddressByType(companyInfo.RecId, LogisticsLocationRoleType::RemitTo);
freeTextInvoiceHeaderFooterTmp.update();
}
ttscommit;
}

}

I need to add custom fields from SalesTable and CustInvoiceTable to the report.

I am trying to link the SalesTable to the FTI by Acct and PurchaseOrder, but I do not have the means to reference CustinvoiceTable or CustinvoiceJour in this class to add fields, then link SalesTable, even though it is those tables that populate the tmp table in the DP. 

Do I have to extend the FreeTextInvoiceDP differently to get this accomplished?

Can you point me in the right direction for getting the fields added and the link accomplished so I can then update the fields on the report?

Thanks,

Steve

I have the same question (0)

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 681 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 598 Super User 2026 Season 1

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 579

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans