enter values in card form ,it must be reflect in list form

surisuri Member Posts: 123
hi good evening ,
i have field name in the card and list form ;
when i am entering the values in name field of card form ,it must be automatically update in the list form ;
is it possible through the code units;
can you please suggest the code
thank you

Comments

  • SavatageSavatage Member Posts: 7,142
    Data is saved in the table.

    Card Form & List form are just two ways of displaying that data.

    So if it exists in the table it should show on both forms - nothing else needed.
  • Alex_ChowAlex_Chow Member Posts: 5,063
    suri wrote:
    hi good evening ,
    i have field name in the card and list form ;
    when i am entering the values in name field of card form ,it must be automatically update in the list form ;
    is it possible through the code units;
    can you please suggest the code
    thank you

    No coding is required. This is already part of standard NAV.
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    I hope they are not card and list forms..
    they are document and sub form forms, right?
  • surisuri Member Posts: 123
    good morning one and all,
    these are document and subform right ;we have two fields
    with same names ,when we are entering the data in one field it must automatically reflect in another field with same name of the field;
    does it possible through code units.
    i have gone through sales order and sales ordersubform ,but i am not able to get the result ;can it possible through code unit ,can any one please suggest me
    thank you
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Please use proper terms while posting your problem like card, list etc

    You need to populate fields from header to line or line to header?
  • surisuri Member Posts: 123
    thank for your reply mohana
    i need to populate fields from header to line
    thank you
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Then check Prepayment % field in Sales header table.
    if you modify Prepayment % in header then it will be changed in existing sales lines Prepayment % field also..
  • surisuri Member Posts: 123
    hi mohana sir ,
    what you have told that i have tried,it was simply updating what we entering into the document into list form
    let us consider if we have 5 fields data in the table ,in the list form these 5 fields are updating when we are entering prepayment% .
    that is not actual requirement sir;
    when we enter the data first time in the document form it must be reflect in the list form,for second time when we are entering the data it must be shown in the second line ..can you suggest me

    on sales header
    >table
    Prepayment % - OnValidate()
    UpdateSalesLines(FIELDCAPTION("Prepayment %"),CurrFieldNo <> 0);

    on sales line
    >table
    Prepayment % - OnValidate()

    IF ("Prepayment %" <> 0) AND (Type <> Type::" ") THEN BEGIN
    TESTFIELD("Document Type","Document Type"::Order);
    TESTFIELD("No.");
    IF CurrFieldNo = FIELDNO("Prepayment %") THEN
    IF "System-Created Entry" THEN
    FIELDERROR("Prepmt. Line Amount",STRSUBSTNO(Text045,0));
    IF "System-Created Entry" THEN
    "Prepayment %" := 0;
    GenPostingSetup.GET("Gen. Bus. Posting Group","Gen. Prod. Posting Group");
    IF GenPostingSetup."Sales Prepayments Account" <> '' THEN BEGIN
    GLAcc.GET(GenPostingSetup."Sales Prepayments Account");
    VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");
    END ELSE
    CLEAR(VATPostingSetup);
    "Prepayment VAT %" := VATPostingSetup."VAT %";
    "Prepmt. VAT Calc. Type" := VATPostingSetup."VAT Calculation Type";
    "Prepayment VAT Identifier" := VATPostingSetup."VAT Identifier";
    CASE "Prepmt. VAT Calc. Type" OF
    "VAT Calculation Type"::"Reverse Charge VAT",
    "VAT Calculation Type"::"Sales Tax":
    "Prepayment VAT %" := 0;
    "VAT Calculation Type"::"Full VAT":
    FIELDERROR("Prepmt. VAT Calc. Type",STRSUBSTNO(Text041,"Prepmt. VAT Calc. Type"));
    END;
    "Prepayment Tax Group Code" := GLAcc."Tax Group Code";
    END;

    TestStatusOpen;


    IF Type <> Type::" " THEN
    UpdateAmounts;
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Why do you need this?
    you can directly enter value in Line itself..
Sign In or Register to comment.