Hello Community,
We have a requirement where we need to show only investigation edit page and hide all the others in the + button of the detail, as displayed in figure below.
.
How can we achieve this?
Thank you,
Like
Hello Mariam,
Here is the example with the "Contracts" detail on the contact edit page where I have setup several edit pages:
Here is the list of these edit pages on the contact page:
And my task is to remove the "Specification" option. To do that:
1) Create a replacing view model for the "ContractDetailV2"
2) Add the following code to the methods of this replacing view model:
getEditPages: function() { var editPagesCollection = this.get("EditPages"); var editPagesItems = editPagesCollection.getItems(); var indexToRemove = editPagesItems.map(e => e.values.Caption).indexOf("Specification"); editPagesCollection.removeByIndex(indexToRemove); return editPagesCollection; }
3) Save the schema and refresh the page in the UI
As a result the "Specification" option is gone from the list:
So in this case the main objective is to override the logic of the getEditPages method according to your business needs.