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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Dynamics Portal - Conditional Create Button in Entity List

(0) ShareShare
ReportReport
Posted on by

Hi

Is there a way to make the "create"-Button from a Entity List conditional? In Portalmanagement i have unter "Entity List - Options - Create" the option "Filter Criteria" (see Screenshot).

My Question: Is there a way to check "If count of records in entitylist is bigger than 0" then hide the "Create Button".  Or is this requirement only with JavaScript makeable? 

pastedimage1605892149180v1.png

How to solve the problem (JavaScript, Liquid or Parameters in Portal Manager) doesn't really matter, but I need a way to hide the create-button when a record has already been created. Thx for any help.

 

solution:

$(document).ready(function () {
    SetNewButtonVisibility();
});

function SetNewButtonVisibility() {

    var list = $(".entity-grid").eq(0);

    list.on("loaded", function () {
        var rowCount = list.find("tr").length;
        
        if (rowCount > 1) {
            $(".create-action").hide();
        }
        else {
            $(".create-action").show();
        }
    });
}

I have the same question (0)
  • Suggested answer
    Dy365Fan Profile Picture
    on at

    I found a solution by another Post:

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/370751/dynamics-portals-powerapps-portal-hide-show-button-based-on-logged-on-contact-condition

    thx to oliver.rodrigues

    $(document).ready(function () {
        SetNewButtonVisibility();
    });
    
    function SetNewButtonVisibility() {
    
        var list = $(".entity-grid").eq(0);
    
        list.on("loaded", function () {
            var rowCount = list.find("tr").length;
            
            if (rowCount > 1) {
                $(".create-action").hide();
            }
            else {
                $(".create-action").show();
            }
        });
    }

  • CRMJetty Profile Picture
    3,512 on at

    Hello,

    pls refer this link,

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/227763/hide-a-ribbon-based-on-security-roles---crm-2016-online

    https://lakshmanindian.wordpress.com/2012/05/23/check-user-security-role-in-crm-2011-using-jscript/

    I hope it helps,

    Thanks.

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
NeerajPawar Profile Picture

NeerajPawar 31

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 19 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 16

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans