Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

Importing general journals with AIF inbound port.

Posted on by 465

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
    VermaMC 465 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
    André Arnaud de Cal... 287,696 Super User 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
    VermaMC 465 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
    André Arnaud de Cal... 287,696 Super User 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.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans