Update Problem

ib3ansib3ans Member Posts: 3
Hi all,

I have a customize table. It has only 2 fld. When i Insert/update/Delete i want to update sales line table my customize field. How can i do above case? My code is does not update to my customize fld ](*,)
At Customize Table (Call From All Validate, All trigger)
IF recSalesLn.GET("Document Type","Document No.","Source Line No.") THEN
  IF recSalesLn."Hidden TCost (Q)" = 0 THEN BEGIN
    recTCost.SETRANGE("Document Type","Document Type");
    recTCost.SETRANGE("Document No.","Document No.");
    IF recTCost.FINDSET(TRUE,TRUE) THEN
    recTCost.SETRANGE("Source Line No.","Line No.");
    IF recTCost.FINDSET(TRUE,TRUE) THEN BEGIN
      recTCost.CALCSUMS("Gross Selling Price");
      recSalesLn."TCost" := recTCost."Gross Selling Price"; (Actual 1000 but after close form i see 0 at sales line);
    END ELSE
      recSalesLn."TCost" := recTCost."Gross Selling Price";
      recSalesLn.MODIFY;
  END;
Regards,

Comments

  • ara3nara3n Member Posts: 9,256
    put your code on insert/ onmodify/ ondelete of your customized table.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • DenSterDenSter Member Posts: 8,305
    Better yet, put the code in a function and add a call to the function to the table triggers.
  • ib3ansib3ans Member Posts: 3
    Hi all,

    Thank you. But
    ara3n
    put your code on insert/ onmodify/ ondelete of your customized table.

    DenSter
    Better yet, put the code in a function and add a call to the function to the table triggers.

    Yes ...!
    I wrote
    At Customize Table (Call From All Validate, All trigger)

    Any idea ? :oops:

    Regards,
  • DenSterDenSter Member Posts: 8,305
    You will need to troubleshoot this issue. Run the process with the debugger and see if it does what you want it to do. If it doesn't, modify the code so that it does. There's not much else we can say about that.
Sign In or Register to comment.