Delete Pic After Import

SavatageSavatage Member Posts: 7,142
edited 2006-01-10 in Navision Attain
After Importing an Items' Picture. I would like it to ask if I want to delete file file off the drive.
OnPush()
PictureExists := Picture.HASVALUE;
IF Picture.IMPORT('*.BMP',TRUE) = '' THEN
   EXIT;
IF PictureExists THEN
  IF NOT CONFIRM(Text001,FALSE,TABLECAPTION,"No.") THEN
   EXIT;
CurrForm.SAVERECORD;

But unlike a dataport where I can
Put the following Code in the OnPost Dataport Trigger
CurrFile.CLOSE; 
IF Confirm(Text000, true) then 
ERASE(CurrDataport.FILENAME); 

Where Text000 = 'Would you like to delete the file?'

I can't seem to get it to work on the Item->Pic->import

I'm sure it's right in front of my face

Answers

Sign In or Register to comment.