Hiding fields on Record producers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2014 10:43 AM
I am trying to hide the short_description field on a record producer. I created a UI policy that when the incident is a P1 it hids all fields and alerts the uset to call. The script is working for every field but the short_description field. I figured there was another UI policy or client script that was interfearing with the onChange UI policy so i disabled all UI policys and client scripts and tested the script. Again all other fields i am needing to hide in fact hids but the short description. How can i figure out what is interfearing with the UI policy to hide the short_description.
function onCondition() { g_form.setDisplay('short_description',false); g_form.setDisplay('Communications',false); g_form.setDisplay('u_investigation_opened',false); g_form.setDisplay('u_investigation_closed',false); g_form.setDisplay('u_incident_description_how',false); g_form.setDisplay('u_witnesses',false); g_form.setDisplay('u_incident_type',false); g_form.setMandatory('Employee Involved', false); g_form.setMandatory('Employee Involved', false); g_form.setMandatory('short_description', false); g_form.setMandatory('u_employee_name', false); alert('Code 1 Incidents require a phone call); }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2014 07:36 AM
check your dictionary for short description did someone check mandatory there... if it isn't a client script or a UI policy that is the only other place i can think of... other than a view br.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2018 01:26 AM
This is very old post but I am posting this answer to help someone who may face this issue in present or future.
Function setDisplay: false works when field is not mandatory like it has pre-check for mandatory. Reversing the code lines like below, should resolve the issue:
First:
g_form.setMandatory('short_description', false);
Then :
g_form.setDisplay('short_description',false);