How to Update One Field Data in a Table

sjensjen Posts: 34Member
Let's say I want to update "salerperson code" in customer table. There are thousands of customers and I want to change each "salerperson code" to different "salerperson code". If would have a few I would do like
Customer - OnAfterGetRecord()
new "salerperson code" := old "salerperson code";
modify;


Like this goes thousands of rows.
p3xxt63fi66j.png

Best Answer

  • sjensjen Posts: 34
    Accepted Answer
    I did it with a dataport.

    The dataItem is "Customer".
    -Properties
    AutoSave,AutoUpdate,AutoReplace=no


    CLEAR(CustRec);

    CustRec.GET("No.");
    CustRec."Salesperson Code" := "Salesperson Code";
    CustRec.MODIFY;

    Thank you

Answers

  • sjensjen Posts: 34Member
    Accepted Answer
    I did it with a dataport.

    The dataItem is "Customer".
    -Properties
    AutoSave,AutoUpdate,AutoReplace=no


    CLEAR(CustRec);

    CustRec.GET("No.");
    CustRec."Salesperson Code" := "Salesperson Code";
    CustRec.MODIFY;

    Thank you
Sign In or Register to comment.