- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 01:44 AM
Hi All,
I want restrict users from attaching files on incident form, once incident is closed or resolved.
Kindly suggest on this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 06:13 AM
Hi Amit,
Please refer to :To restrict attachment on incident from, once state is closed or resolved.
also you can refer to :To alert (error message), while clicking on attachment icon on incident form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 02:38 AM
Onload client script of the form,
function onLoad()
{ var strVal = "javascript:saveAttachment('incident', '');";
var arrLink = document.getElementsByTagName('a');
var intLen = arrLink.length;
for (var intCnt = 0; intCnt < intLen; intCnt++)
{ strAttrib = arrLink[intCnt].getAttribute &&
arrLink[intCnt].getAttribute('href');
if (strAttrib == strVal) { arrLink[intCnt].style.display = 'none'; } } }
In case the script does not work, try the alternative approach provided below.
function onLoad()
{ var refs = document.getElementsByTagName("a");
if (refs)
{ for (var i=0; i < refs.length; i++)
{ var ref = refs[i]; var inner = ref.innerHTML;
if (inner.indexOf("attachment.gifx") > 0)
{ ref.style.display = 'none'; } } } }
Thanks,
Vinitha.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 02:38 AM
Hi,
Please refer to To restrict attachment on incident from, once state is closed or resolved.
The same topic is being discussed.
You can write an onload client script to validate the state and add this code
if(g_form.getValue('state') == 3 || g_form.getValue('state') == 6){
g_form.disableAttachments();
}
3 - Closed
6 - Resolved
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 06:13 AM
Hi Amit,
Please refer to :To restrict attachment on incident from, once state is closed or resolved.
also you can refer to :To alert (error message), while clicking on attachment icon on incident form.