I have a custom record and it has children. In cer...
# suitescript
n
I have a custom record and it has children. In certain circumstances columns on the children need hiding when viewing the parent and seeing the children on the parent record. I'm good with hiding them using a UE script on beforeload but hit a snag. It doesn't work on VIEW. Can anyone suggest a work around / different approach, feel I'm forgetting something... For more clarity, I'm "getting" the sublist and then the getting the sublist fields and using updateDisplayType to hide them.
e
what about using pageInit from client script? Another thing to try is to create an HTML field and inject code to hide the fields.
n
pageinit on client doesn't run on view
I suppose I could inject some messy, hacky html in to a field on beforeload to hide the columns but hate that idea.. sounds like the kinda crap NS would pull... 😄
e
haha, yeah, actually you could run some suitescript code in the HTML code, no need to use CSS or something like that.
n
problem is on beforeload the columns I'm interested in are not available to "get" to then update the displaytype so I doubt client script would work.
(as in client script in html that is suitescript)
j
Try putting something like this in a client script that is deployed on your custom record
Copy code
jQuery(document).ready(function() {

	// Your code to hide the columns goes here

});
n
Thanks for the suggestion. The columns (tabel td's) have no ID's for me to pick out with jquery, it'd be monstrous to try and second guess what NS will do when rendering. (I tried)
I'm looking at flipping out the form instead, think it's going to work...