This method is used to hide any item on the page that has an ID. It works both on server side and on the client side.
hideItem() is best used in After record processed or Before display events. How to find item ID?.
Syntax
$pageObject->hideItem("itemId");
Example
For elements in the data grid on the List and Print pages, use the $recordId parameter in the After record processed event:
$pageObject->hideItem("custom_button", $recordId);
Note: you can also use the JavaScript function toggleItem() in ClientBefore/ClientAfter events or in the Field events to hide/show the elements.
Remarks
Hidden Edit controls are submitted with the form and saved in the database. Hidden controls will be filled by the Autofill feature. You can apply default values to hidden controls.
See also:
•JavaScript API: RunnerPage object > toggleItem()
•Example: How to hide the Edit link