microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
730 stars 243 forks source link

[Question] How to 'Remove' data from blob field, subtype=Bitmap. #6126

Closed PieterJacob closed 4 years ago

PieterJacob commented 4 years ago

Experts,

When a field is setup like below...

field(10; Picture; Blob)
{
    Caption = 'Picture';
    SubType = Bitmap;
}

...it allows the user to attach a picture to the blob field by clicking on the add sign when this field is added on a page object. Once a picture is attached to the field it seems unclear to me how to undo this action, in other words remove the picture. See below printscreen, the only options are either Choose or Cancel. Previous versions from Dynamics Nav also had the option to delete the image.

Please tell me how to setup the field to make this possible again, to remove the picture. Thanks. image

dzzzb commented 4 years ago

True, there should be a way to remove (besides the awful hack of e.g. uploading a 1x1 image of a white pixel...)

PieterJacob commented 4 years ago

True, there should be a way to remove (besides the awful hack of e.g. uploading a 1x1 image of a white pixel...)

I read some documentation that showing blob fields on a page are deprecated. https://docs.microsoft.com/nl-nl/dynamics365/business-central/dev-itpro/developer/analyzers/uicop-aw0009-blobbitmapusageonpagefielddeprecated.

So we are thinking about upgrading the field to a media type. Nonetheless, as long as those blob fields are still there, it should work properly ;).

dzzzb commented 4 years ago

As far as I could tell, when we try to use Media instead, there is no automatic handling of upload/download, and we are expected to write a ton of boilerplate code ourselves. And MS are not using it e.g. in the base app's Company Information. So I concluded that I would switch when MS make the feature good enough to take their own advice ;-)

Not saying this was the idea, but it would not be a great strategy to randomly remove bits of functionality from deprecated types, in order to jostle users towards their replacements, when said replacements AFAICT lag a lot in ease of use and would require much new code

PieterJacob commented 4 years ago

As far as I could tell, when we try to use Media instead, there is no automatic handling of upload/download, and we are expected to write a ton of boilerplate code ourselves. And MS are not using it e.g. in the base app's Company Information. So I concluded that I would switch when MS make the feature good enough to take their own advice ;-)

Not saying this was the idea, but it would not be a great strategy to randomly remove bits of functionality from deprecated types, in order to jostle users towards their replacements, when said replacements AFAICT lag a lot in ease of use and would require much new code

Thanks, will take this in consideration.

thpeder commented 4 years ago

This repository no longer handles general questions and is only dedicated to bug reports for the latest preview version of the AL compiler and developer tools.

To get help for your question please use one of the following resources: Business Central Community mibuso forum Dynamics User Group