Use script include in a condition field Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2023 04:32 PM - edited 09-18-2023 04:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2023 04:48 PM
Hi Yoli1,
you need to instance your script include using the command new.
Try it:
!new ListProperties().isRelatedList() && !new ListProperties().isRefList() && (new ListProperties().getTable() != "sys_user" || gs.hasRole("admin"))
I recommend you to join all the ListProperties conditions in one single function in your script include and execute just a single script include execution.
If you think my answers are useful for you, I would appreciate it if you could mark my answers as helpful.
Best regards,
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2023 04:58 PM
HI @JimMarciano this is what i did but it doesn't work can you please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2023 05:20 PM
remove the list from the parameter of the function.
add between the lines 3 and 4, the command:
var list = new ListProperties();
On condition field must be:
new test().yes()
The function name that you created is yes.
If you think my answers are useful for you, I would appreciate it if you could mark my answers as helpful.
Best regards,
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2023 05:27 PM
@JimMarciano Still dosent work