AL icon indicating copy to clipboard operation
AL copied to clipboard

Pictures in Extensions

Open Hilbekale opened this issue 8 years ago • 20 comments

  • AL Extension Version: al-0.17.35624.vsix

I have an issue with a picture. I have created a new table and added an blob (subtype = picture) into it.

I get the information of the UICop: { "resource": "/c:/Entwicklung/easySUPRA/src/page/Pag70108578.SUPQualityProtocolCard.al", "owner": "generated_diagnostic_collection_name#0", "code": "AW0004", "severity": 4, "message": "A Blob cannot be used as a source expression for a page field.", "source": "AL", "startLineNumber": 236, "startColumn": 44, "endLineNumber": 236, "endColumn": 55 }

I did the implementation as the picture in the company information. Is this a bug or do i have to solve this problem different? I saw the issue #2346, but this covers not my case?!

Hilbekale avatar Aug 20 '18 20:08 Hilbekale

Any Updates on this? I am still stuck to provice pictures in an extension. We are trying to bring the extension to the app store.

Issue still exists in al-2.0.43900

Added fields to a new table (blob / Subtype = bitmap)

Added fields to a card page:

  • Message: { "resource": "/c:/Entwicklung/easySUPRA/src/page/Pag70108578.SUPQualityProtocolCard.al", "owner": "generated_diagnostic_collection_name#1", "code": "AW0004", "severity": 4, "message": "A Blob cannot be used as a source expression for a page field.", "source": "AL", "startLineNumber": 233, "startColumn": 44, "endLineNumber": 233, "endColumn": 55 }

I have to admit, that the picture works fine in the web client. In my opinion the "problem" should not appear.

Hilbekale avatar Sep 23 '18 16:09 Hilbekale

Have you taken a look at the Media and MediaSet types for displaying your images? See: Working with Media on Records

Using the media types should work on all clients.

ghost avatar Sep 26 '18 13:09 ghost

Stepped into the same problem. To mee it looks like a false positive of the UiCop.

The client renders a blob field with subtype bitmap in the tables field def as an image. So does the webclient of my local container sandox.

Only it would be nice to get rid of the warning.

rtslbrnft avatar Oct 01 '18 10:10 rtslbrnft

Hi @Hilbekale and @UweBoehme, thanks for reporting this issue. We have discussed this internally and we will remove the original warning.

However, as @HunterFeltman-MSFT replied, we are trying to move towards using the Media and MediaSet types. Therefore we will add a new deprecation warning towards using Blobs in this way instead.

ghost avatar Nov 02 '18 14:11 ghost

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 25796.

If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo

For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://blogs.msdn.microsoft.com/freddyk/2018/04/16/which-docker-image-is-the-right-for-you/

ALGitHubBot avatar Dec 12 '18 12:12 ALGitHubBot

@JohanStenberg100 How about action for delete/export of existing blob fields on card pages?

image

Is this no longer supported as well?

ivandjordjevic avatar Dec 18 '18 15:12 ivandjordjevic

Hi Ivan, I'm not 100% sure I understand your question. We are trying to move towards using Media and MediaSet. We will have warnings but we do not have any plans of removing support for blob fields. If you have found a bug, post a new issue and we can take it from there.

ghost avatar Dec 18 '18 16:12 ghost

@JohanStenberg100 If you look at windows client and older versions of NAV, you had options for delete and save picture by using right-click:

image

This seems like it's not available any more?

ivandjordjevic avatar Dec 19 '18 14:12 ivandjordjevic

Hi @ivandjordjevic, sorry if I'm missing your point again, but you are referring to the web client correct? That today we don't offer the same capabilities as the Windows Client does?

ghost avatar Dec 19 '18 14:12 ghost

Well yes, we don't have those capabilities today with blob field on web client. Is it a web client constraint or blob issue and we need to move to media?

ivandjordjevic avatar Dec 19 '18 14:12 ivandjordjevic

@ivandjordjevic I have to ask around a bit, let me see what the plan is.

ghost avatar Dec 19 '18 14:12 ghost

We will not be investing further in picture blobs going forward. As a result, for picture blobs we will not make any context menu available in the Web client that is similar to what the Dynamics NAV Windows client historically provided.

Yes, Media/MediaSet is the future. Short-term (3-6months) we have no plans to provide platform capabilities for common operations such as Delete, but this is something we believe adds value and will consider in our longer-term plans. In the meantime, you will need to write AL code in your application to delete pictures and similar.

hope this helps you figure out your next steps! Best regards, Mike Borg Cardona, The Business Central team at Microsoft.

mikebcMSFT avatar Dec 20 '18 12:12 mikebcMSFT

@MikeBarker-MSFT Yes, thanks for clarification and guidance!

ivandjordjevic avatar Dec 20 '18 12:12 ivandjordjevic

@mikebcMSFT Since i got several AL AW0009 warnings, i stumbled upon this topic. I do have lots of list pages (which should NOT be ran in brickview mode) that currently have multiple BLOB fields. The warnings forces me to move towards Media/MediaSet fields, but these do not show up on normal List pages in the webclient. What is the alternative (NOT using brickview) in the webclient using Media fields instead of BLOBS (without using external components such as Meta UI)?

image

image

I want to get a similar experience as we used to have in the Classic Client showing whether remarks or available or not using the Pencil icon ;)

fvet avatar Sep 05 '19 14:09 fvet

#5401

fvet avatar Dec 29 '19 08:12 fvet

Hello @fvet ,do you know if there is any way of displaying MediaSet fields en list pages without using brickview?

borjaruizfuentes avatar Feb 04 '20 15:02 borjaruizfuentes

No idea, still waiting feedback from MS on this matter. Maybe @AndreyKorepanov or @mikebcMSFT can further provide a status update?

fvet avatar Feb 04 '20 15:02 fvet

hi, any news about this topic? "any way of displaying MediaSet fields en list pages without using brickview?"

Thanks Roberto

rstefanetti avatar Mar 04 '21 08:03 rstefanetti

Hi @mikebcMSFT,

Any customer wants to take a picture with the camera (think of a phone/tablet BC client) and see it in a decent size, not just an icon in a list. If this sounds fair, I have a scenario where I need to display the mediaset image that I take with the camera in a list view and display it afterwards at a decent size if I click on the record, or a button. I have these issues so far (and unless I probably look at storing in Sharepoint I don't see how to achieve this):

  1. I use a cardpage with a card part that opens up the image in a custom page when I click the list record (similar to Item Card), however this doesn't come in a decent size to discern what is in the image, it is very tiny and doesn't make sense why, unless the mediaset is compressing the image to a standard small size? Is there something I am missing or I haven't found the right documentation link for?
  2. I tried to do the same thing using a Blob field with a Bitmap subtype, but this got deprecated. Which I can understand if Mediaset will take over the world, but so far to me Mediaset makes sense for an icons, it doesn't help in a camera taken image.

I hope this makes sense. Please forward to the right team if I missed anything and there is a way to do what customers need, or else if you can provide a timeframe of an alternative - how to display a mediaset (camera taken) picture at the decent size.

What I tried:

  • I tried the export functions (thinking even a download would do as an alternative) but they were blocked for extension development for some reason.
  • I tried to use a blob field instead, with subtype Bitmap, however that has been deprecated too.

Regards, Robert

robertosb avatar May 05 '21 00:05 robertosb

This issue (and 5401) is still relevant five years later. Media does not show in a card page group either, but a blob does. But blob is being deprecated!

navdotnetreqs avatar Jan 04 '25 11:01 navdotnetreqs