Business Central Emoji Buttons 🙈🤩💩

Some of my posts are a bit gimmicky. This is my worst yet 😂

In my recent post about multiple images: https://joshanglesea.wordpress.com/2022/10/20/business-central-multiple-item-images/ I used emojis on a picture toggling feature. UI wise it looked visually appealing and it was appropriate UX for the circumstance. The concept was born out of another post where I used a grid layout to generate my own buttons, instead of using the standard page actions. You can check out the original post here: https://joshanglesea.wordpress.com/2022/06/10/business-central-horizontal-tabs/

Why am I following up this topic? Have I seen the error of my ways? Do I need to warn you of using this set of concepts? My reason for follow up is to share a minor discovery. I actually think this is an acceptable concept in the right circumstances. If you’re dubious about using emojis I’d suggest watching this video, and consider my usage of emojis is purely for display and not “data”: https://www.youtube.com/watch?v=cr9UCF-jEz0&t=1419s

So what’s this follow up I have to share? I figured out that the grid layout results in field placement differences depending on where you place the field control. Below is a mock up of what I mean. The code for both is identical but the field controls are taken to the left if on the main page object. A factbox is a pagepart and it has the field controls placed to the right instead!

I showed in the multi images post that you can add spaces to the field control or label which houses the emoji character. It does however create a long drilldown line:

What about using them in page actions? Well it’s ok if you leave them in a sub list of the page actions. See the 📸 emoji in two places within the page actions area. The one on the left hand side has an extra “Image” assigned to it whilst the right is just the caption:

Being left or right with emoji’s makes all the difference! 🤗

Business Central Multiple Item Images 🖼️

The item table picture field is a field type of “MediaSet” – most of the other tables holding images have the same (customer, vendor, employee etc.):

Which means you can store multiple images other other media content. However, when you try to import another image for an item which already has one you get this confirmation message:

Similarly with the BC API you cannot add another image it will only offer replacing the existing one. Is there a way around this? Of course there is! Once you have multiple images you can do some other cool things to enhance the user experience. I found when adding many images to a mediaset was easy but displaying them was a better challenge.

Code is available at the end but here are the capabilities I had a play with. Big caveat would be it is recommended not to hold high resolution images and especially large quantities of them. However, MediaSet exists as an option so why not know the overall set of options?

Adding an additional item image:

Drilldown to all the assigned images:

Factbox which let’s you toggle between item images with a few variations on how it looks:

A grid view of all assigned item images:

Deleting is a bit odd as you delete from the Tenant Media table but the Item.Picture.Count still keeps a count. Something else would be needed here I’m sure:

Conclusions are that you can work with multiple images and show them in some cool ways too. Still a good idea to use the “Links” feature though so you can store this kind of data elsewhere and prevent bloating the size of the database and of course impacting on performance. Page loads aren’t too bad if the user is deciding to open a view for the images. The factbox stuff would need fine tuning if to be used. This post represents a good alternative: https://joshanglesea.wordpress.com/2020/08/14/business-central-to-sharepoint/

Any code I used to build these demos: https://github.com/JAng13sea/Blogs/tree/master/Item%20MediaSet