dynamic filter option on reference field

Rj27
Mega Guru

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.

find_real_file.png

 

find_real_file.png

38 REPLIES 38

Change accessible from to All application scope & check.

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.

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()

Regards,
Muhammad

Try with global.ScriptIncludeName & check.

Hi Muhammad n Sudhanshu,

Tried both ways but none of them is working.