Dear Community,
I have the same detail on a page but in 2 different pages.
Is it possible to remove the (+) button from the detail on one page but not the other?
I've read this one and this one on how to hide it, but they hide the (+) button on every page.
This tab requires the detail to have a (+): Detail1
On a different page, this detail can not have the (+): Detail2
Thank you.
Kind regards,
Yosef
Like
Hello Yosef,
I have an article on that topic here: https://customerfx.com/article/conditionally-making-a-detail-read-only-…
Basically, the article determines if the "Add" button is available based on the column that the detail is connected to the page with. For example, if you had a detail that could be on the Account page (connected by the detail column UsrAccount) and also on the Contact page (connected by the detail column UsrContact), you could make the Add button available only on the Account page by using the following:
getAddRecordButtonVisible: function() { // if the detail is connected to the page using the column UsrAccount // make the Add button visible return (this.get("DetailColumnName") === "UsrAccount"); }
Ryan
It is also possible to create 2 details based on the same object - one with "+", another - read-only
Ryan Farley,
but there is a problem when having inline editable list, even after hiding the menu commands "Add, Edit, Copy, Delete" of the detail using "getEditRecordMenuItem: Terrasoft.emptyFn", the buttons still there when clicking a record so we can do all the operation
is there a way to hide them as well based on a condition, and make the fields non-editable
one solution for making them disappear is to comment or remove the lines of ActiveRowActions :
but this solution doesn't prevent the record's fields to be editable, and also not dynamic based on a condition