Values posting problem from page to table.
Rajat_M
Member Posts: 34
Hello,
I'm working on Sales Order page. I have created two fields in Cust. Ledger Entry table, Address1 & Address2. Then in the Sales Order page I have taken three variables, Address1, Address2 & RecCLE(Record).After that I wrote the following code:
Address1- OnValidate()
RecCLE.RESET;
RecCLE.INIT;
RecCLE.Address1:=Address1;
RecCLE.INSERT;
Address2- OnValidate()
RecCLE.RESET;
RecCLE.INIT;
RecCLE.Address2:=Address2;
RecCLE.INSERT;
After executing the page when I enter the values in those fields, only the first value goes to the Cust. Ledger Entry table that is Address1. But I want to bring both the values in Cust. Ledger Entry table. What should I do next??
I'm working on Sales Order page. I have created two fields in Cust. Ledger Entry table, Address1 & Address2. Then in the Sales Order page I have taken three variables, Address1, Address2 & RecCLE(Record).After that I wrote the following code:
Address1- OnValidate()
RecCLE.RESET;
RecCLE.INIT;
RecCLE.Address1:=Address1;
RecCLE.INSERT;
Address2- OnValidate()
RecCLE.RESET;
RecCLE.INIT;
RecCLE.Address2:=Address2;
RecCLE.INSERT;
After executing the page when I enter the values in those fields, only the first value goes to the Cust. Ledger Entry table that is Address1. But I want to bring both the values in Cust. Ledger Entry table. What should I do next??
0
Answers
-
Unless your RecCLE is temporary: STOP RIGHT HERE. We don't "manually" insert Lines into CLE.
Usually the solution would be to just
1.) add the Fields to T36-SalesHeader and all the corresponding tables (sales invoice header, sales shipment header) if you want them listed there too.
2.) add those fields to their respective pages
3.) add those 2 fields to CLE
4.) Look through the posting routine, and add code to fill your fields in CLE while posting.Austrian NAV/BC Dev0 -
I was being told that I have to use codeunit..!0
-
Hey Bro,
One Question - Why you need address in Customer Ledger Entry?
Now your issue -
You need to learn posting routine for sales posting.
Hint (only for Customer Ledger)** -
A Sales order when posted via 81 and 80, creates a journal.
Then Journal posting routine is called which actually creates Detailed Cust. Ledger and then Customer Ledger..
Dig it and let us know what you found...
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0 -
Rajat,
If you are doing any customization on standard tables then its always recommended to follow the standard processes instead of writing your own set of codes and creating new objects and codeunits. In this case of yours I will too recommend to the same what Wisa123 has recommended and I belief you might have been asked to do the same way and use standard codeunits.
Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

