How to determine 'instanceOf' or class of a reference field on the client-side
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2014 05:39 PM
So I have a custom table of which I have a check-box field and a reference field. The reference field is to the task table. I have a requirement that if the value in the task reference field is a problem ticket to hide the check-box field.
I'm looking for something akin to the 'instanceOf()' to determine if the referenced object is a problem ticket...is there something similar for g_form that I can use. Didn't see anything in the wiki.
Any ideas?
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2014 06:01 PM
I assume your custom table extends from task table and you didn't mention your field name. You could use a UI Policy and dot walk to Parent.fieldname contains 'problem'. If true, hide the checkbox field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2014 06:03 PM
No my custom table does not extend the task table. It is a 'from scratch' table...it just contains a reference to the task table. Sorry if I wasn't clear.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2014 06:06 PM
No problem, you don't have to dot walk to the parent table. You can still go UI policy, task table contains 'problem'. Pretty simple. I think that's easier than client script.