Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

CommaTextIO is not initalized - AX 2009

Posted on by 80

Hi All,

I have a custom code written to read CSV file and I am getting "CommaTextIO is not initalized " error. This code is written in AX 2009. Kernel and Application Version : 5.0.1500.6491

Localization version -Eastern Europe

Below is the code snippet.

FileName path = @"\\Test\Test.csv";

permission = new fileIOpermission(path,#io_read);
permission.assert();

textIO = new CommaTextIo(path,#io_read);
textIO.inFieldDelimiter(",");
textIO.inRecordDelimiter('\r\n');

I have verified that I have proper access to path. The class is having property set to Run on Server and is extending Run base batch class. 

Is it necessary that the service account used to run AOS should also have access to this network path ?

Any help will be very great.

Thanks In Advance.

  • Shailee Shah Profile Picture
    Shailee Shah 80 on at
    RE: CommaTextIO is not initalized - AX 2009

    After providing access to AOS service account to that path it worked.

  • Shailee Shah Profile Picture
    Shailee Shah 80 on at
    RE: CommaTextIO is not initalized - AX 2009

    Hi BR, Sergei,

    Let me try adding service account with full access to file and folder and check.

  • Shailee Shah Profile Picture
    Shailee Shah 80 on at
    RE: CommaTextIO is not initalized - AX 2009

    Hi Blue Wang,

    I have gone through the thread but it does not resolved my issue. I do have UNC path and as well as shared folder and tried from both.

    One more thing I would like to add is that If I try to run this from a file which is on my desktop it is working fine.

    Don't know what is missing between network path and desktop path.

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: CommaTextIO is not initalized - AX 2009

    Hi Shailee,

    If you create TextIO on server side AOS service account should have access to that file or folder.

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: CommaTextIO is not initalized - AX 2009

    Hi Shailee,

    Yes, The recommended approach is to use shared folder and UNC path.

    Please refer this thread:

    community.dynamics.com/.../textio-object-not-initialized

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans