[] - Disable the New Button - Related List - Forum - Rollbase - Progress Community

[] - Disable the New Button - Related List


[] - Disable the New Button - Related List

This question is not answered


I have the main record page and there is a related list of records available for that record. I would like to disable the "New" button for that related list. I have tried many techniques but none of them seem to remove the click functionality of that new button. What is the best way to achieve this?



All Replies
  • Hi,

    Click on Design This Page of record page

    Click on Related List Property panel Icon

    Uncheck the "Show New Link" and "Enable Quick Create" check boxes and Save.

    Hope This helps.



  • Sorry Rajkumar,

    I think I did not explain it properly. I would like to disable it programmatically based on a condition. I am aware of that option on the design of the page. Could you please get back to me with a programmatical way of disabling the new button?



  • Hi ,

    You can't prevent New record create button click action even you add "k-state-disabled"  (Usually "k-state-disabled" class will be added to button by Kendo if it is disabled)  class through program, because we always hide this button from user if they don't have permission ( we don't disable them) where as some other buttons like "delete or more actions" disabled when no record is selected, so we always prevent click actions if those buttons have "k-state-disabled" css class . I would suggest you to hide New record create button from toolbar based on your condition. I wrote a code snippet to hide/show them conditionally.


    //Listen for page render, tab activate and session expanded events,you can remove if you have only one tab.

    //Added all events just to make sure don't miss any scenario

    $(document).on(rb.newui.util.customEvents.rbs_pageRender +" "+rb.newui.util.customEvents.rbs_tabActivated+" "+rb.newui.util.customEvents.rbs_sectionExpanded,function(){



    function hideCreateRecordButton(condition){

      var pageComponent = rb.newui.page.PageContext.getPageComponent(179622); //CellId of your related list


     var kendoConfig = pageComponent.getKendoConfig();


       var gridEle = pageComponent.getKendoConfig().element; //Get grid element

    var gridToolbarContainer =  gridEle.prev('.gridToolbarContainer'); //Get grid toolbar element

    var newBtnEle = gridToolbarContainer .find('.gridToolbar .rbs-gridNewObjCreateBtn'); //Get new record button element










    Hope this helps,


  • Hello Vimal,

    Thanks for your reply. Could you suggest me a programmatic way of retrieving the cellId of my related list please?