- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 09:24 AM
Hi Folks,
I have change requests related list on release form. I want edit button on related list to be visible only when the release is in draft state.
I have written script in omit edit button as follows but its not working as intended!
answer=true;
if (parent.state == -4 );
{answer=false;}
Any pointers please?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 09:38 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 09:38 AM
answer=true;
if (parent.state == '-4' );
{answer=false;}
try now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 09:50 AM
Hi Amaneet,
Your script looks fine, however, you can re-check a couple of things:
1) OOB the value of the Draft state on rm_release is -5, whereas you are using -4 in your condition.
2) Ensure that you have not checked the Omit edit button checkbox while you are using this script.
Once you have ensured the above, the below script should help you achieve your expected results.
if (parent.state == '-5' )
{
answer = false; // If Release state is Draft, returns false for omitting Edit button
}
else
{
answer = true;
}
Hope this helps. Let me know if you have further queries.
PS: Mark this answer as Correct if it solved your query or hit Like/Helpful depending upon the usefulness of the response.
Regards
Supriya Bisht

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 01:47 AM