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

Notifications

Announcements

No record found.

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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 45 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans