Show item action buttons in Dynamics 365 Portal Entity list as horizontal buttons instead of vertical list

Recently I got this requirement where I needed to show the actions buttons inside Entity List in horizontal fashion.

Be default whenever you configure entity list item action buttons like Details/ Edit/ Delete/ Workflow, it shows up in vertical fashion.

image

However the customer wanted to show the buttons horizontally, side by side. It’s actually much simple. All we need is the below code on load of the entity list.

$(“.entitylist’”).on(“loaded”,function() {

$(“.entitylist”).find(“.dropdown-menu”).css(“display”, “inline-flex”).css(“padding”, “0px”).css(“position”, “relative”).css(“top”, “”).css(“left”, “”).css(“margin”, “0px”);

$(“.entitylist”).find(“.dropdown-menu a”).css(“color”, “#fff”);

$(“.entitylist”).find(“.dropdown-menu a”).addClass(“btn btn-info”);

$(“.entitylist”).find(“.dropdown-menu a”).hover(function () { $(this).css(“color”, “red”); }, function () { $(this).css(“color”, “#FFFF”); });

$(“.entitylist”).find(“.dropdown-menu”).siblings().hide();

});

And after refreshing the portal cache, it looks like below.

image

Awesome isn’t it?

Hope this helps!

Debajit Dutta

(Business Solutions MVP)

For training and consulting, write to us at info@xrmforyou.com