How to show display record on form only but not save

2»

Comments

  • SavatageSavatage Member Posts: 7,142
    Is CustomerNo saved on this table somewhere? are you entering it?
    Or is this a field also you don't want to save on this table?

    It's getting close to post your table :lol::lol:
    object designer->File->Export

    lets hope it comes clear what's missing
  • webweb Member Posts: 102
    CustomerNo;No i get it from the customer table it is not same.
  • SavatageSavatage Member Posts: 7,142
    I understand it's different. This is what I understand at this point.

    You have a table (still unknown) it apparently has some field on it that can link to the customer table. You would like to get some of the info (customer's name) from the customer table to appear on your (still unknown) table.

    The customer name is appearing but when you go to the "next line" (i think) you say the cust name disappears from that line and it's only appearing on the line you are on.

    You need to remove that customer.name := '' on getnextrecord trigger.

    On the first page of this post I posted a sample of how to get the Vendor Name on the item list (tablar form). It's just that simple, take a look again. My thought was you are not putting the code on the correct trigger. But you say it is. So I'll take your word.

    Other than that The cust name should appear as long as your CustomerNo is filled with a value. Again remove any CustomerName := '' code that might appear.

    Hey no Saint smiley :mrgreen: Oh! O:)
  • bbrownbbrown Member Posts: 3,268
    What I understand is that the issue is occuring when you are trying to enter a new record. Try making the following changes:

    On AfterGetRecord()
    //IF Vendor.GET("Vendor No.") // Old Code
    // THEN venname := Vendor.Name;


    IF NOT Vendor.GET("Vendor No.") THEN
    Vendor.INIT;
    venname := Vendor.Name;

    // This will clear venname when you move to a new (blank) record


    Vendor No. OnAfterValidate() The form trigger (Textbox)

    IF "Customer No." <> xRec."Customer No." THEN BEGIN
    IF Cust2.GET("Customer No.") THEN
    CustName := Cust2.Name;
    END;

    // This will retrieve the value for the new record.
    There are no bugs - only undocumented features.
Sign In or Register to comment.