- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2016 07:10 AM
Hi All,
Currently I am using Helsinki version of SNOW, in this version we have a Advanced list control with scripts.
When I am trying to omit a New button of a Related List using script for a Closed state condition, it is hiding for closed state as well as rest of the states.
The thing is, it is hiding in each state otherwise it is visible in each state.
I am using below script, please see the attached screen.
Please if you get my issue, let me know the solution.
Thanks,
Vikas Ambulgekar
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2016 10:07 AM
I think you need to give answer; at the end. Like this: (From Helsinki Product Documentation: Advanced list control with scripts )
var answer ;
if (current.u_state=='Closed') { //Do not remove the 'New' button
answer = false ;
}
else { //Remove the 'New' button
answer = true ;
}
answer ;
If that doesn't work, use parent object in place of current like said in the doc. I'm not an expert but this is how I would try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2016 07:21 AM
Try,
var answer=false;
if(current.u_state=='Closed') //Make sure Closed is the state 'name'
{answer=true;}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2016 10:07 AM
I think you need to give answer; at the end. Like this: (From Helsinki Product Documentation: Advanced list control with scripts )
var answer ;
if (current.u_state=='Closed') { //Do not remove the 'New' button
answer = false ;
}
else { //Remove the 'New' button
answer = true ;
}
answer ;
If that doesn't work, use parent object in place of current like said in the doc. I'm not an expert but this is how I would try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2016 09:26 PM
Thanks Veena
First I tried using current object but it's not worked, so I tried using parent object now it's working.
Thanks everyone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2017 10:35 AM
use parent instead of current, works fine !!