web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Portal Entity List Show/Hide Custom Button Using Java Script on column value

(0) ShareShare
ReportReport
Posted on by 15

I am adding a custom button to an Entity List

I want to hide/show the button depending on a specific column value of each row.

The red below code works on the ID of the row = ????, but I need to replace the data-id with a whole number column called [Count] so that if this [Count] column is 0 it wont display the button, anything above it will

$(document).ready(function () {

$(".entitylist.entity-grid").on("loaded", function () {

$(this).children(".view-grid").find("tr[data-id]").each(function (i, e){
var id = $(this).attr("data-id");

if ($(this).attr("data-id") == "996b793b-f675-ec11-8943-00224807089a"){
$(this).append("<td><input type='button' style='background-color:lightgreen' onclick='callPowerAutomateInPerson(\"" + id + "\");' value='Attend The Gym' /></td>");
}
});
});
});
I have the same question (0)
  • Suggested answer
    Manoj Mane Profile Picture
    1,020 on at
    RE: Portal Entity List Show/Hide Custom Button Using Java Script on column value

    Hi,

    If you are using the OOB functionality of the Portal. You can add filter condition on the action button.

    Please refer the below link:-

    www.engineeredcode.com/.../dynamics-365-portal-filter-criteria-and-action-buttons

    Thanks,
    Manoj.

    Please mark this as VERIFIED if it helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 179

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 129 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans