- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 11:08 AM
I have a Catalog item that is using the Available for Option in the Maintain Item
there are 2 options...
option 1 is allowing members of branch see the item (THIS OPTION WORKS)
checkCondition();
function checkCondition() {
var user = gs.getUserID();
var email = gs.getUser().getEmail();
if (email.indexOf('@winstarinc.com') > -1) {
return true;
}
return false;
}
can someone please look at option 2 and tell me where my error is?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 11:15 AM - edited 10-04-2023 11:22 AM
Hello @Walter Toney ,
Can you please add .toString() and try
var email = gs.getUser().getEmail().toString();
I tried with your code giving toString it is working fine for me.
Thank you,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 11:15 AM - edited 10-04-2023 11:22 AM
Hello @Walter Toney ,
Can you please add .toString() and try
var email = gs.getUser().getEmail().toString();
I tried with your code giving toString it is working fine for me.
Thank you,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 07:08 AM
Omkar,
got a question.. this worked on a normal Catalog Item .. .would this work for and external Content Item
I see no reason why it wouldn't but it does not seem to be the case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 11:25 AM
That was the solution.. thank you for you assistance