Autopopulate the image
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-21-2023 02:16 AM
I am created the one filed in the incident table
field name : profile image
type: image
in user table one field is there name is upload image
my requirement is when we are created the incident record we are select the caller right which person we are selected that person image auto populate the our field value(in the incident table).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-21-2023 02:32 AM
Hello @Venky Kshatriy2
You need to write onChange Client Script.
var value = g_form.getValue('caller_id');
var gr = new GlideRecord('sys_user');
gr.addQuery('caller_id', value);
gr.query();
if(gr.next()){
g_form.setValue('profile_image_field_name', gr.image_field_name_of_user_table);
}
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-21-2023 03:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-21-2023 03:39 AM
Hi @Venky Kshatriy2 ,
You need to copy the image onto the Incident table
Use this:
var donorTable = 'incident';
var donorID = '2b6644b15f1021001c9b2572f2b47763';//sys id of source record
var recipientTable = 'incident';
var recipientID = '78e47fe94f31d200bf004a318110c7d4';// sys id of target record
GlideSysAttachment.copy(donorTable, donorID, recipientTable, recipientID);
Thanks and Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-23-2023 09:49 PM