simple request - Urgent !!!

masqazi
Member Posts: 22
i am struggling to create a journal and post it thru code... anyone can help me out by giving example code of creating a journal and posting it using X++..
My actual problem is, i want to post transaction related to an LC. So we must post into a separate lc ledger account, and the bank account specified in the LC will be the offset account. on the lc form i will be having a POSTING button. when clicked, it should display a payment journal. how to do this... i know this is a childish request to ask for code..but still
My actual problem is, i want to post transaction related to an LC. So we must post into a separate lc ledger account, and the bank account specified in the LC will be the offset account. on the lc form i will be having a POSTING button. when clicked, it should display a payment journal. how to do this... i know this is a childish request to ask for code..but still
Smile !! it increases your face value.
0
Comments
-
16 views and no reply.... Atleast some hints expectedSmile !! it increases your face value.0
-
0
-
Hi,
I would create a journal first and then import the journal lines by code. For some guidance, please have a look at some basic codes in my website -
http://www.harishm.com/Navision/Code.html
It is fairly easy to import journal lines by code. If you have any problems/queries please feel free to post here or mail me.
I am not sure whether you would be interested in this or not. But for the sake of information, there is also another option as well. Either you can do this by writing code or you can try using Atlas XL. It is an Excel add-on using which you can import journals into Axapta. This is quite powerful. You can also use this to generate some complex reports across Axapta. For more info, please visit -
http://www.globesoftware.com.au/AtHome.htm
or write to Steve Wright at steve@globesoftware.com.au
Regards,
Harish MohanbabuHarish Mohanbabu
Long way to go before I sleep..0 -
hi harish..is it possible if u post a code example ..for creating journal and journal line and post it using X++.....i am not getting a way to move ahead...thanksSmile !! it increases your face value.0
-
Hi,
Apologies for the delay in my response.
Here is a skeleteon code -LedgerJournalTrans ljt; ; ljt.overwriteSystemfields(true); ljt.TransDate = str2date(STRLRTRIM(conpeek(line,1)),123); //DATE ljt.JournalNum = conpeek(line,2); // JOURNAL NUMBER ljt.AccountType = conpeek(line,3); //ACCOUNT TYPE ljt.AccountNum = conpeek(line,4); //ACCOUNT ljt.Txt = conpeek(line,5);//DESCRIPTION ljt.AmountCurDebit = abs(conpeek(line,6));//DEBIT ljt.AmountCurCredit = abs(conpeek(line,7)); //CREDIT ljt.OffsetAccountType = conpeek(line,8); //OFFSET ACCT TYPE ljt.OffsetAccount = conpeek(line,9);//OFFSET ACCT ljt.Voucher = conpeek(line,10);//VOUCHER NO (MANUAL) ljt.CurrencyCode = conpeek(line,11);//CURRENCY ljt.insert();
Should you wish, you can validate each and every line even while you import. Also in the above code, the voucher number is being imported manually. Alternatively you can get the next number sequence.
If you are not familiar with importing lines from a CSV file, please refer to the sample code in my website -
http://www.harishm.com/Navision/Code.html
Hope this helps,
Harish MohanbabuHarish Mohanbabu
Long way to go before I sleep..0 -
Thanks for the code..
another request.. i want to have a special type of payment journal for posting LC specific transaction. There will be a button on LC form, and when the user press it, the above special journal should be opened which will automatically have the ledger account type, journal name,offset account info specified in it. any example / idea / hints ???
2. in axapta, is it sufficient for us to post transaction into the correct ledger account,and the rest of things is taken care by axapta, like cash forecast, vendor balances, financial statements, etc (apart from standard setting we do intially during implementation) ?Smile !! it increases your face value.0 -
Hi,
Point 1 - I am not sure what you want to do here. But on click of a button, if you just want to open a form and display, you should write something like this -FormRun frm; ; frm = ClassFactory.formRunClass(new args("SalesTable")); frm.init(); frm.run(); frm.wait();
The above code example would open SalesTable form.
Point 2 - Yes! Provided the fact that all the things mentioned by you has been correctly set-up/configured, you don't need to do anything.
Regards,
Harish MohanbabuHarish Mohanbabu
Long way to go before I sleep..0 -
Thanks Harish ! your have really taken pain to help me.
Still my problem seems to be not clear... see in accounts we can use a single journal for all types of transactions or we can customize it for particular transaction. For example, instead of using the simple "General Journal" we use "payment journal" in AR / AP wherein only transactions related to sales / purchases can be entered. similarly when a button is pressed on my form, a customized journal should be opened wherein user can enter transactions related to LC only... how to have this journal ???
secondly, a new number sequence should be attached to this journal. I am facing problem here also.Smile !! it increases your face value.0 -
in my table i have used a field based on "PurchIdBase" extended data type which is purchase order id. then on my form which uses this table, i have place a menuitembutton which refers to a menuitem, which in turn acts on form "PurchTable" the purchase order form.
when i press the above button, the purchase order form is opened which shows records corresponding to currently selected record in my form. i want to know how this happens and what processes are involved behind the screen.
** this request is not related to my actual post.Smile !! it increases your face value.0 -
eagerly waiting for response, specially from harishSmile !! it increases your face value.0
-
masqazi wrote:[...]
** this request is not related to my actual post.
So why not creating a new Topic?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions