Can "starts with" be a condition within a Client Script?

Edwin Fuller
Tera Guru

I need to write an onLoad Client script that checks if the parent field starts with a 3 letter prefix of "CUS". I have not has much success with this can someone show me how this would be written?

Thanks,

Edwin

1 ACCEPTED SOLUTION

Okay... sounds like a UI Policy to flick the visibility of the related list may do the trick... provided you can dot-walk to the parent field.



I may have a play with this to see if the parent field is accessible.


View solution in original post

7 REPLIES 7

Okay... sounds like a UI Policy to flick the visibility of the related list may do the trick... provided you can dot-walk to the parent field.



I may have a play with this to see if the parent field is accessible.


Thank you Dave, I guess I should have checked that at first. It just my mind immediately went to "oh this is a client script" lol



Thank you though I was able to access the parent field within a UI policy and hide my related list


It just my mind immediately went to "oh this is a client script" lol


Bwhahaha! Yeah, it's a common route.



Truth be told, pretty much everything can be achieved using client scripting... but it's not always the best approach.   I advocate trying everything else first - the falling back to client scripts if all else fails, i.e.: client scripts are the last resort, not the first choice.



(this from someone that teaches scripting courses, too!)



Good to hear you've got it sorted!