- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2016 02:24 AM
I am trying to insert a new record to another table.
Issue is the record gets inserted but with the blank values.
var gr = new GlideRecord('asmt_m2m_category_assessment');
gr.initialize();
gr.assessment_record = current.vendor;
gr.category = current.u_it_resource_subtower;
gs.addInfoMessage(gr.assessment_record);
gs.addInfoMessage(gr.category);
gr.insert();
Output : for assessable record : sysid
gr.category : correct value
But the record created in the table does not have any value for any of the two columns.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2016 04:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2016 03:45 AM
I have admin role
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2016 03:50 AM
if you have admin role and you have access to see all the data.
is there already data present in the table or empty?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2016 04:05 AM
What is the field type of the assessment and category?
try with
gr.assessment_record = current.vendor.getDisplayValue();
gr.category = current.u_it_resource_subtower.getDisplayValue();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2016 04:49 AM
I used getDisplayValue() and setDisplayValue and it worked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2016 05:09 AM
Please mark my response as correct so that it gets removed from unanswered list and will help others to find the answer quickly.
If you are viewing this from the community inbox you will not see the correct answer button. You need to open the thread directly and you will see a correct answer button with red star. Please review this How To Mark Answers Correct From Community Inbox