How to copy attachment from rm_enhancement to rm_story
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 01:27 AM
HI,
I have a requirement where , Copy attachments to story record from enhancement record.
FOr this already UI action in place but no glide ajax calling and no script include involved client callable checked.
In this case hoiw can we achive this.
existing code in ui action
function openFormDialog() {
var sysId;
if (typeof rowSysId == 'undefined')
sysId = gel('sys_uniqueValue').value;
else
sysId = rowSysId;
var gModalForm = new GlideModalForm('Create Story', 'rm_story');
gModalForm.setPreference('sysparm_view', 'scrum');
gModalForm.addParm('sysparm_query', 'short_description=' +
g_form.getValue('short_description').replace(/\^/g, '^^') +
'^description=' + g_form.getValue('description').replace(/\^/g, '^^') +
'^assigned_to=' + g_form.getValue('assigned_to') +
'^classification=Feature' +
'^enhancement=' + sysId +
'^sys_class_name=rm_story'
);
gModalForm.setCompletionCallback(function(action_verb, sys_id, table, displayValue) {
if (action_verb == 'sysverb_insert') {
if (typeof GlideList2 !== 'undefined') {
if (GlideList2.get("rm_enhancement.rm_story.enhancement"))
GlideList2.get("rm_enhancement.rm_story.enhancement").refresh();
}
}
});
gModalForm.render();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 01:36 AM
Hello @sinu2 ,
You can refer the below article to move or copy the attachment from one table to another table.
Please mark my solution as accepted and give thumbs up, if it helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 01:45 AM
since this is a client callable UI action Server code will not work. I tried just putting one log not working.
Thanks