Delete picture both from Mediaset and Tenant Media

Hi,

I want to remove a picture in item via functions.

If i use this, even if the picture deleted from the mediaset field, it wasn’t deleted in tenant media.

How to remove both picture in mediaset and tenantmedia ? What’s the relation between those two ? thanks.

procedure DelPicture(No: Code[20]) Return: Text
var
recitem: Record item;
begin
item.get(parItemNo);
if item.picture.Remove(item.picture.Item(1)) then begin
item.modify;
exit(‘delete done’);
end else
exit(‘delete can not be done’);
end;