Al: Pictures in Extensions

Created on 20 Aug 2018  路  17Comments  路  Source: microsoft/AL

  • 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?!

bug ships-in-future-update

All 17 comments

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.

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.

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.

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.

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鈥檛 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/

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

image

Is this no longer supported as well?

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.

@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?

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?

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 I have to ask around a bit, let me see what the plan is.

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.

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

@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 ;)

5401

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

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

Was this page helpful?
0 / 5 - 0 ratings