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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AX Journal Import -Defination group

(0) ShareShare
ReportReport
Posted on by 135

Hi all,

 Please suggest me  regarding the Journal Import process in AX2009 . Plan is to import CSV file( through Defination Groups) for the  General Journal lines ( table : LedgerJournalTrans ) though the standard  AX Batch process .

1. When I manually import any excel file then the Status of the Defination group changes to 'Imported in Total' .So every time , User has to import files he has to manually change the status to 'Import' which is not practical in real scenario where same file has to be  imported 2-4 times  in a day . So what is the best way to handle this.

2. When in the defination group the type is 'Excel' or 'Standard' , the option to define Batch defination comes but in case of 'Custom'( for csv file) , the Batch option does not come . How to set batch for the import of CSV files?

3.For csv file import , what is the best process to do import.
Does the field set up(under defination group),sequence for active fields can be modified as per the import file or the import file should have the sequence as per AX field set up ?

I believe that for auto creation of Journal header number has to be coded in the defination group so that every time the file is imported the Journal header is creeated with the Ax number sequence


Please suggest .

Thanks and Regards ,
Mandy

*This post is locked for comments

I have the same question (0)
  • Rajdip Das Profile Picture
    3,333 on at
    Re: Re: Re: Re: Re: AX Journal Import -Defination group

    Hi check the following link.

     http://dynamicsaxworld.blogspot.com/2009/01/auto-posting-ledger-journal-in-ax.html

    This blog contents only the creation journal and corresponding lines. After completing this procedure only you have to click on the post button and the journal will post. This created journal you can also see from the ledger journal Table form. As per you requirement you have to a bit of customise a new process. I have mentioned earlier the excel import import process and after importing you have incorporate this class for creating journal & lines. The Journal Lines Excell should be contained minimum of 9 fields (it varies as per your req and also defined defalt value in class, say transDate, you can import from excel or you can also write it into class by hard code), i.e. AccountType, AccountNum, TransText, Debit, credit, offset account type, offset account, dimension, and transdate. And then go to journal form -> Line -> check once and click on post.

     

    Note: "ledgerJournalCheckPost = ledgerJournalCheckPost::newLedgerJournalTable(ledgerJournalTable,NoYes::Yes);"

              ledgerJournalCheckPost() -- this method is called for posting lines. If you comment this line then journal and lines has been created but not posted,. You have to post manually by clicking "Post" button

     

     

  • Mandyc Profile Picture
    135 on at
    Re: Re: Re: Re: AX Journal Import -Defination group

    Hi Rajdip,

     Yes I would be needing the  customized journal posting class and other details .

    So in this case you have ceated a new method to import and not used the Defination group  functionality . Ok ,so in this case every time the user needs to import , he has to manually click the import button otherwise can  we also put the Batch function like Standard AX where on a defined time period say every 6 hours or every 1 day import the file from this path .

    Please send the  customized journal posting class and also suggest as how we can put a Batch for import .

    Thanks ,

    Mandy

     

     

     

  • Rajdip Das Profile Picture
    3,333 on at
    Re: Re: Re: AX Journal Import -Defination group

     Hi Mandy,

    I did same procedure in my previous client. I did there a tool for create journal & lines. They just upload the excel by a clicking a button and full line are updated in LedgerJournalTans table along with journal no. They are doing just post before once checked. You can provide such type of tool for ur client. I am stating down the procedure.

    1. Create a excel sheet and fill up with it required fields (like, Account Type, AccountNum, transdate, debit & credit amount, offset account, offset account type and dimension)

    2. create a dialog form consisting of a text box and a button like browse. After clicking browse file dialog open box will open and ask for the file name. In the form a button would be there like "Ok". After selecting file(.xls) & also after clicking Ok system read the excel file and checked required validations of every line like account num exists or not, you have wrote account type is ledger but in accountnum filed you have written vendor code and etc. such this formalities.

    3. After completing successful validation then write a class for generating journal and lines. At first you have to create journal and then lines will be inserted into table with journal num.

    Note: Journal type must be in "Daily" type.

    If you need customized journal posting class or reference then I can provide you.

    (Note: Don't try directly in live server. First you do in development server and after getting successful result then incorporate into live.) 

     

     

     

     

  • Mandyc Profile Picture
    135 on at
    Re: Re: AX Journal Import -Defination group

    Hi Rajdip,

     Thanks for the information . I tried again and is now working ok  but can you please  advice on the follwoing points which I enquired earlier.

    1. The Status of the Defination group changes to 'Imported in Total' after the file gets imported  . So every time , User has to import files he has to  manually change the status to 'Import' which is not practical in real scenario where same file has to be  imported 2-4 times  in a day . So what is the best way to handle this. How can we set the status always to 'Import'.

    2.  When in the defination group the type is 'Excel' or 'Standard' , the option to define Batch  comes but in case of 'Custom'( for csv file) , the Batch option does not come . How to set batch for the import of CSV files as this is very imp in my case as I want to put batch process  where the CSV files will be imported automatically on the recurrence time set in Batch group .

     3.  Journal Header -> How can be automatically create this while importing csv file as presently , I have to manually create ther Journal in AX and then import the csv file .

     Please suggest.

     

    Thanks,

    Mandy 

     

     

     

    3. 
     

     

     

  • Rajdip Das Profile Picture
    3,333 on at
    Re: AX Journal Import -Defination group

     Hi Mandy,

    .csv import is the right choice out of between xls and  csv. I did every time of import .csv. At the time of importation of .csv file please consider following...

    1. Create defination group with Type = Custom

    2 .csv takes onle text format

    3. Internal DAX .csv conversion is a comma seprator conversion

    4. Under table set up -> Genearal Tab -> place "," in Field Seperator field

    5. Under field set up, arrange your .csv field with your table table field consequently.

    6. All the fields should be active

    7. before import please see the preview (it shows only 1st record)

    Note:  In case of 1st time use then please take table back up before run your .csv import.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans