instanceOf in scoped application

ssturde
Kilo Expert

I have a copy of a UI action in my new scoped application that uses the function 'instanceOf'. It works fine in the global scope, but not inside the scope. It's in my condition statement, and I'm wondering if there is a scoped alternative for it. Here's the condition statement:

current.canCreate() && (!current.instanceOf('task') || gs.getProperty('glide.ui.task.insert') == 'true') && (!current.instanceOf('sys_db_object')) && !current.x_elar_metrix_ela_record ==''

Any help is greatly appreciated.

1 ACCEPTED SOLUTION

ericeger
Tera Guru

Hi Stephen,



I think you should be able to use current.sys_class_name != 'task' instead of instanceOf within a scoped application.  



Eric


View solution in original post

6 REPLIES 6

That's great! I wasn't aware of that, so that's pretty useful! Hopefully someone else will able to use your answer in the future, nice job.


Katherine4
Tera Expert

I know this is an old question, but I have a different answer.

You can use this technique to test instanceOf in scoped applications:

GlideFilter.checkRecord(current, 'sys_class_nameINSTANCEOFtask');

 

Regards
Katherine