Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

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

$
0
0

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>");
}
});
});
});

Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>