How to add image in Business Central?

MortenSteengaard
Member Posts: 144
Hi experts,
Hmm, I cannot find a category for "Business Central"-related questions. I hope it is OK to put my question here.
I have made my own extensions for Business Central Cloud (Sandbox): One new table and one new list page.
I want to show a picture on my list page (and maybe later on a new card page). And I want it to be possible for the user to insert a jpg-file, to change the file in BC and to delete the file in BC (= empty the field).
As I understand, Media or MediaSet are the best types to use in this case.
The problem is that the field is not at all visible on my list page.
What am I missing?
If I make a new list page with the field "Picture" from table "Company Information", I can see the picture and change it. It is a Blob-field. But if I make my own field of type Blob, then I can only see a plus sign on my list page and I cannot add my jpg-file to the field.
Hmm, I cannot find a category for "Business Central"-related questions. I hope it is OK to put my question here.
I have made my own extensions for Business Central Cloud (Sandbox): One new table and one new list page.
I want to show a picture on my list page (and maybe later on a new card page). And I want it to be possible for the user to insert a jpg-file, to change the file in BC and to delete the file in BC (= empty the field).
As I understand, Media or MediaSet are the best types to use in this case.
The problem is that the field is not at all visible on my list page.
What am I missing?
If I make a new list page with the field "Picture" from table "Company Information", I can see the picture and change it. It is a Blob-field. But if I make my own field of type Blob, then I can only see a plus sign on my list page and I cannot add my jpg-file to the field.
table 50100 CarBrand { DataClassification = ToBeClassified; Caption = 'Car Brands'; fields { field(1; "Car Brand"; Code[20]) { DataClassification = ToBeClassified; Caption = 'Brand'; } field(2; Description; Text[50]) { DataClassification = ToBeClassified; Caption = 'Desc.'; } field(3; "Picture of Logo"; Media) { DataClassification = ToBeClassified; Caption = 'Logo'; // Subtype = Bitmap; } keys { key(PK; "Car Brand") { Clustered = true; } } }
page 50100 CarBrand { PageType = List; ApplicationArea = All; UsageCategory = Lists; SourceTable = CarBrand; Caption = 'Brands...'; layout { area(Content) { repeater(General) { field("Car Brand"; Rec."Car Brand") { ApplicationArea = All; ToolTip = 'The brand'; } field("Description"; Rec.Description) { ApplicationArea = All; ToolTip = 'Some desc.'; } field("Picture of Logo"; Rec."Picture of Logo") { ApplicationArea = All; ToolTip = 'The logo'; } } } } }
0
Best Answer
-
Media/set is not supported on list pages, see https://github.com/microsoft/AL/issues/5401 (be sure to like the last comment to draw attention to it : ) )
And if you use a blob, can you use the ondrilldown trigger to trigger the import file screen?5
Answers
-
Media/set is not supported on list pages, see https://github.com/microsoft/AL/issues/5401 (be sure to like the last comment to draw attention to it : ) )
And if you use a blob, can you use the ondrilldown trigger to trigger the import file screen?5 -
Hi foo_bar.
Thank you very much.
Best regards,
Morten0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions