dynamic filter option on reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2020 10:06 PM
Hi All,
Can we define dynamic filter option on 'requested for' reference field as shown?
Can we use 'current' this way directly? Because the following script is not working at all.
Note: I am using this under default value related list with a reason to set default values when i click on lookup option. From reference qualifier i am returning something else and can't define the default values there.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2020 11:44 PM
Change accessible from to All application scope & check.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2020 11:54 PM
still not working..
even tried using gliderecord and then passing the query but that's not working either.
The first log itself is not coming that means the script include is not at all called.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 12:08 AM
As you are referencing the script include in the Reference script field so I believe script include must be classless. The classless script includes just contains one function and the function name must match the script include name.
Sample script
Name - getRequestedFor
function getRequestedFor() {
var query = "your query here";
return query;
}
You can call it in the script field of Dynamic filter as getRequestedFor().
If you don't want to create classless script include then you should empty Reference script field and if the script include and dynamic filter are in different scope then you should prefix script include name with global. while calling in script field.
new global.GetRequestedFor().getrequestedFor()
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 12:14 AM
Try with global.ScriptIncludeName & check.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 12:25 AM
Hi Muhammad n Sudhanshu,
Tried both ways but none of them is working.