How to set Document ID field using GlideRecord

mukki
Kilo Contributor

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

1 ACCEPTED SOLUTION

domaners
Kilo Guru

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';


View solution in original post

12 REPLIES 12

mukki
Kilo Contributor

Hi Adam,



Did you got any fix for this issue ? I tried even after disabling ACL but no luck it's still same.


Hi Mukesh. Sorry, yes I did spend a good half an hour yesterday looking at this but the field doesn't seem to want to be mapped to. I can't see any obvious rules or policies that should be blocking it, so I need to have another look.



You should try logging a support ticket for this in the meantime!


mukki
Kilo Contributor

Hi Adam,



Thanks for the extra effort you put to help me, reaching HI for further assistance on this issue.Will let you know the solution they advice.