How to restrict Knowledge base based on sold products
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 03:18 AM
Hi All,
I have a requirement to show the Knowledge bases based on sold products.
I have added the below script in user criteria
var con = new GlideRecord('customer_contact');
con.addEncodedQuery('accountISNOTEMPTY');
con.addQuery('sys_id', user_id);
con.query();
if (con.next()) {
var acc = con.account.getDisplayValue();
var pro = new GlideRecord('sn_install_base_sold_product');
pro.addEncodedQuery('account=' + acc);
pro.query();
if (pro.next()) {
var sold = pro.name;
if (sold == "Adobe Systems InDesign 5.5") {
answer = true;
}
}
}
And added this to Can Read related list tab.
Please let me where I am doing wrong?
Thanks,
Sam
0 REPLIES 0