Executing a client script when attachment is added to incident table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2015 01:08 PM
I have a requirement to set certain field values when an incident is saved with an attachment file of specific file name.I wrote on submit client script which uses a script include to query sys_attachment and return the values based on requirement.This works fine ,no issues faced.But I recently noticed that adding an attachment to incident doesn't need a save on incident which will not execute my on submit client script and thus it will not set the fields.Is it possible to make this on submit client script execute when an attachment is added to the incident form or make save action mandatory after adding the attachment?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2015 03:46 AM
There is a UI page "attachment" and then you can find the code for attachment button as below:
<input disabled="true" class="button" id="attachButton" type="submit"
value="${gs.getMessage('Attach')}" onClick = 'return ABC()' />
and then you can define your function inside <script> tag of the same UI page.
Thanks
Deepak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2016 11:16 AM
Hi Jeevan,
You can write an business rule on the sys_attachment table. Put your logic and update the related incident record from that BS rule itself.
Regards,
Rahul Jain