I created a dataport to update table fields but its not updating but instead writes a new record and increment the previous primary key by 1. Can someone help me? both AutoSave and Autoupdate is set to Yes. I dont know what i am doing wrong. Thanks
0
Comments
You need these to get the record and then to update it.
In general I would import the data into the fields of a table I DON'T save.
In the OnAfterImportRecord-trigger, I put some C/AL code to get the record, change the fields and to modify it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
-Properties
AutoSave,AutoUpdate,AutoReplace=no
In the "OnBeforeImportRecord()"-trigger, you must clear all the variables in your dataitemfields. If it are only fields of the dataitem-record, a CLEAR of it is enough:
In the OnAfterImportRecord()-trigger: (you need to define a new global "recEmployee" as type Record:Employee
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thanks
In the Dataport-properties you must put (you need also to put the < and the > ; the characters must be EXACTLY is I wrote):
FieldSeparator=<TAB>
FieldStartDelimiter,FieldEndDelimiter=<None>
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!