How to change the value of a field after exporting records?

rstolsrstols Member Posts: 28
I have a dataport which works fine and give me the output I need. I also have to change the value of a field after exporting the records but it doesn't work.

I used the following code in the OnAfterExportRecord and OnPostDataItem trigger points

Status := Status::"Sent Third Party";
"Credit Expiry Date" := TODAY;
"RBT Expiry Date" := TODAY + 90;
COMMIT;

The dataport doesn't make the change I need and I don't know what else to try?
Please help with any suggestions?

Thanks

Comments

  • matttraxmatttrax Member Posts: 2,309
    You may have changed the fields, but you didn't save them. You have to do a MODIFY to write them to the database.

    And no need for the COMMIT. If your dataport errors out you will have problems in that some records have been changed but not exported.
  • rstolsrstols Member Posts: 28
    Thank you for the advise, it's now updating the fields as needed.

    Thanks again for the help.
Sign In or Register to comment.