Basic development question about tables

allendeallende 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.


  • Options
    KowaKowa Member Posts: 918
    edited 2005-04-18
    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."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
    GenJnlLine."Posting Date" := "Posting Date";
    GenJnlLine."Document Date" := "Document Date";
    GenJnlLine.Description := "Posting Description";
    GenJnlLine.MyBool := MyBool;
    Kai Kowalewski
  • Options
    allendeallende Member Posts: 51
    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

    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.
  • Options
    KowaKowa Member Posts: 918
    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 Kowalewski
Sign In or Register to comment.