Hiding "New" Button on Related List Based off of Parent Variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2016 08:40 AM
I have two tables: The first is u_supply_requests and u_supplies_to_order. I created a related list on the u_supply_request form to include related u_supplies_to_order. What I want to have happen is when the u_supply_request form's u_state != 2, hide the new button on the related list.
(u_state is a string variable with choices and one of them is "Waiting for Line Items" with a value of 2)
I have already gone into the create ACL for u_supplies_to_order and added this script:
if(RP.isRelatedList())
{
if(parent.u_state == 2)
answer=true;
else
answer=false;
}
**I also added the role public to the acl - same role on the u_supplies_to_order table**
but, that doesn't work. all it does is, no matter what the state of u_supply_requests, when I click new on the related list, it show the u_supplies_to_order form with everything as read only.
Any help would be much appreciated!
Thanks in advance!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2016 08:43 AM
Hi Alex,
Make sure you have created the ACL of "None" type. I guess you have created the ACL as of type "*".
Hope it helps.
Thanks and Regards,
Vikas Malhotra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2016 08:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2016 09:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2016 09:23 AM
I've been trying to get to List Controls all morning, but I don't think that's available for this table. when I go to the form and right click on related list the only options I get are "Filters >" and "Refresh List".
I went to the list of List Controls and my table is not listed and when I try to create a new one, it won't let me add anything to the table field.