Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

javascript to check all cells are yes in a entity list and remove class from button Portal

(0) ShareShare
ReportReport
Posted on by 5

Hi

 

Any help, guidance, is this right place for javascript questions for portal, i hope so.

 

I have an entity list and one column has a yes/no response .  I am trying to get it so that once all rows are completed and the answered column is all yes's then remove a class from a button so it can be clicked.

8814.entitylist.PNG

 

 

I have this code already that colours the rows green when they are yes , but if i replace $(this).parent().addClass('success'); with $('mybtn).removeClass('disabled');  it would make the button active when any are yes

 

$(document).ready(function (){
$(".entitylist.entity-grid").on("loaded"function () {
$(this).children(".view-grid").find("td[data-attribute='py3_yescheck']").each(function (){
// do something with each row
if ($(this).text() == 'Yes') {
$(this).parent().addClass('success');
}
});
});
});

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans