Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Importing general journals with AIF inbound port.

(0) ShareShare
ReportReport
Posted on by 463

Hi all,

I am working on AX 2012. We have a inbound port which is used for importing journal from a third party tool through .net framework. There is a integration issue with one off the field and to test it, I wrote a job to consume the services of the inbound port which is similar to the below link.

https://corbitech.com/2012/07/11/importing-gl-transaction-data-ax-2012-xpp-ledgergeneraljournalservice/

It is working fine. However, I needed to test it with account type cust or Vend and I don't how to pass the customer account in the below code snippet which handles ledgerdimension field.

journalLine1LedgerDimension = journalLine1.createLedgerDimension();
journalLine1LedgerDimension.parmAccount(line1MainAccount);
journalLine1LedgerDimension.parmDisplayValue(line1FullAccount);
journalLine1.parmLedgerDimension(journalLine1LedgerDimension);
Any suggestions on this would be of great help to me.
Thanks,
Verma M.
 
  • VermaMC Profile Picture
    463 on at
    RE: Importing general journals with AIF inbound port.

    There is no parmDisplayValue method in LedgerGeneralJournal_LedgerJournalTrans class. So, I was not able to use JournalLIne2.parmDisplayValue('xxxx');

    Regards,

    Chiranjeevi.

  • André Arnaud de Calavon Profile Picture
    294,283 Super User 2025 Season 1 on at
    RE: Importing general journals with AIF inbound port.

    Hi Verma,

    Did you try to use the other method or both of them providing the customer account number? Like mentioned, I can't verify it as I need a new environment myself.

  • VermaMC Profile Picture
    463 on at
    RE: Importing general journals with AIF inbound port.

    Thanks for the response, André.

    I tried what you said like below.

        journalLine2LedgerDimension = journalLine2.createLedgerDimension();
        journalLine2DimensionCollection = journalLine2LedgerDimension.createValues();
        journalLine2LedgerDimension.parmDisplayValue('xxxxxx');
        journalLine2LedgerDimension.parmValues(journalLine2DimensionCollection);
        journalLine2.parmLedgerDimension(journalLine2LedgerDimension);

    However it didn't work. It threw an error. "Data item Account does not exist".

    Please help if there is any other suggestions.

    Thanks,

    Verma

  • André Arnaud de Calavon Profile Picture
    294,283 Super User 2025 Season 1 on at
    RE: Importing general journals with AIF inbound port.

    Hi Verma,

    You can set the account type on the journal line with the next command:

    journalLine1.parmAccountType(LedgerJournalACType::Cust);

    or

    journalLine1.parmAccountType(LedgerJournalACType::Vend);

    Not sure, but I thought you only have to set the parmDisplayValue method for the customer or vendor account. I might be wrong as I don't have an environment currently to check it.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,283 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,019 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans