Is there is a way to not display the `remove` field on a custom sublist when in view mode only?
Is there is a way to not display the `remove` field on a custom sublist when in view mode only? It causes issues since User Event scripts don’t run in View mode
Alternatively – if you make your field mandatory- then you can’t remove it. Clicking on it does nothing. Then you can workflow the field as not mandatory while viewing the child record in edit mode.
I’m only aware of the hacky way – inspect element to get the Remove <a> id – should be something like remove1href. Then using an inline html field modify the dom on load to set that element display to none.
Also see @dbarnett answer. My suggestion is for standard records – i.e contact/customer.
Is this implemented via parent-child custom records? If so, there is an checkbox option on the custom record definition “Show Remove Link” which will accomplish this.
So I tried this, but the problem is that this removes the ability to allow child record editing and deleting even when in edit mode.
Yes, it can be done by manipulating DOM. I did the same several years ago using Mutation Observer to modify the HTML when the paginated data is served by NetSuite because it refreshes the table everytime. I believe that the data is being served in same fashion. You need to inject the client script via userevent’s beforeload trigger to remove the links column. You must also need to take care the cross-browser behavior of DOM manipulation. I hope this may help you.
Sharing this if anyone else is looking for a solution. Was able to do it via User Event > BeforeLoad:
Will this solution work if a sublist has more than 25 lines i.e. paginated data and select the 2nd page and switching the pages under sublist?