Hi all!
I want to import data from external file (.csv) to G/L Account table. If the search name is empty, I want to save the record equal to name, so I write such code in OnAferImportRecord trigger:
Code:
IF SearchVar = '' THEN BEGIN
"Search Name":=Name;
END ELSE BEGIN
"Search Name":=SearchVar;
END;
It seems ok, but when I run my dataport error occured:
"The field cannot be empty. Please enter a value".
I even try the same code in OnBeforeImportRecord, but nothing changed.
I try to turn off AutoUpdate and AutoSave on the properties and save the record through C/AL code (add line with Insert or Modify as needed), but still same.
Any idea?
Best regards!!!
0
Comments