- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2015 12:53 AM
Hi ,
I am trying to insert record using GliderRecord in table chat_message but i am not able to set the To and From field.I haven't worked with Documnet ID type fields.
Can anyone please suggest how i can populate those document id field using Glide Record
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2015 01:19 AM
Hi Mukesh, the field is called to_id, so set current.to_id = sys_id. from_id is the name of the From field. You may also need to set the to_table and from_table with the name of the tables that the document is coming from as well, for instance:
current.to_id = incident.sys_id;
current.to_table = 'incident';

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2015 12:58 AM
HI
For Server side scripting you can use this :
gs.addInfoMessage('Document sys id -->'+current.u_document_id);
gs.addInfoMessage('Document Display name -->'+current.u_document_id.getDisplayValue());
For Client side you can do :
alert(g_form.getValue('u_document_id')):
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2015 01:06 AM
Hi Harish ,
I already tried with that solution but still not able to populate the value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2015 01:11 AM
Mukesh,
Try to do floowing:
current.document_id = '<<sys_id>> of the record';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2015 01:19 AM
Hi Mukesh, the field is called to_id, so set current.to_id = sys_id. from_id is the name of the From field. You may also need to set the to_table and from_table with the name of the tables that the document is coming from as well, for instance:
current.to_id = incident.sys_id;
current.to_table = 'incident';