How to Update One Field Data in a Table

sjensjen Member Posts: 53
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 Member Posts: 53
    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 Member Posts: 53
    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.