Basic development question about tables

allende
Member Posts: 51
I want to post boolean data two table at the same time.
Case : I checkted correction field in sales credit memo and post it. After this I want to look this field (correction) in Customer Ledger Entry table.
Case : I checkted correction field in sales credit memo and post it. After this I want to look this field (correction) in Customer Ledger Entry table.
0
Comments
-
You should add this new field ( I called it "MyBool" ) with the same Field ID (!!) to the tables 110,112,114 and 6650 as well.
This is very important because otherwise the TRANSFERFIELDS function will mess up the field values if further fields are added after this one in the other tables.
Add the new field to Table 12 Gen. Journal Line. Here you can use another Field ID if necessary.
Then look for this code in Codeunit 12 Gen. Jnl.-Post Line ( in Function "PostCust()" ) and make an assignment for your new field :CustLedgEntry.INIT;
CustLedgEntry."Customer No." := "Account No.";
CustLedgEntry."Posting Date" := "Posting Date";
CustLedgEntry."Document Date" := "Document Date";
CustLedgEntry."Document Type" := "Document Type";
CustLedgEntry."Document No." := "Document No.";
//
CustLedgEntry.MyBool := MyBool;
//
and in Codeunit 80 Sales-Post look for : ( this copies the header data to the Gen. Journal Line)
// Post customer entry
Window.UPDATE(4,1);
GenJnlLine.INIT;
GenJnlLine."Posting Date" := "Posting Date";
GenJnlLine."Document Date" := "Document Date";
GenJnlLine.Description := "Posting Description";
//
GenJnlLine.MyBool := MyBool;
//Kai Kowalewski0 -
Thanks your help KOwa but I can't do.
I added a new field table 110,112,114,and 6650.I added the code codeunit 12 and codeunit80 and I try but I have an error when the record
posting.
Error : Reference to the member correct of variable could not be solved.
Summary : First of all I added the correction field in table 110,112,114 and 6650.My field name is correct and I added sales credit memo header and posted sales credit memo form.After this I added your code in codeunit12 and codeunit80 but an error occured.
Now what can I do about this situation, I wait your help.
Thanks a lot.0 -
Have you added the new field to the Table 21 Cust. Ledger Entry with then same name as used in the Codeunit 80 ?
If the tables had already been modified and you reuse a field ID, the compiler changes the field names in all objects when compiling, based on the new field ID's and the new names.
Please check that all new field names as used in the tables and the new code in the codeunits correspond with each other and then compile ALL the objects that needed to be modified for the new field.Kai Kowalewski0
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