I'm new to business central, I want to remove an attached image file because my client requested that functionality. I created a function that will check that, and it is all working fine. I noticed that I'm doing a repetition for all the image fields, which got me writing the function for every blob field on the page.
I want to write a single function then pass a blob params then receive that and do the check. But I noticed that I can't declare a blob file as a params.
procedure CheckImageFieldValue(imagefile: Blob; removeImageFile: Boolean)
begin
removeImageFile := false;
if imagefile.HasValue() then begin
removeImageFile:= true;
end
else begin
removeImageFile := false;
end;
end;
Error: 'Blob' is not a valid variable type