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 :
Dynamics 365 Community / Forums / Finance forum / Centralized Location f...
Finance forum

Centralized Location for EFT File

(0) ShareShare
ReportReport
Posted on by 2,376

Hi

We had a customization in AX 2012 R3 where we added a parameter in Accounts Payable parameters and modified the class which was generating the EFT file to read that parameter and save the file at provided location.

I am trying to do the same customization in D365 and have found that there is a class CustVendPaymERExport which has a member variable fileDestination of type ERIFileDestination in addition to erFileName which is of type str.

I tried to write the following code in extension class but at the time of generating EFT file it is getting error 'Object reference not set to an instance of an object'.

[ExtensionOf(classStr(CustVendPaymERExport))]
final class CustVendPaymERExport_Extension
{
    public void run()
    {
        str filePath = @"C:\Temp\";
        erFileName   = erFileName + "_HAROON";
        showDialog   = false;
        
        fileDestination.newFileStream(filePath);
        
        next run();
    }
}

Can anyone help what is wrong with this code.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans