- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2017 10:23 AM
Hello,
I have a parent table (table1) that extends the CMDB table. I also have another table that extends table1 (table2).
I created a UI action on Table 2 that will create a record on Table1 with the data from Table2. This works without issue except the choice lists I have on Table 2 does not go over to Table 1 even though the choice lists contain the same names/values. I tested by forcing the value like this "phone.u_phone_manufacturer = "Apple";" and it worked without issue.
Any help would be appreciated... my script is below.
var phone = new GlideRecord('table1');
phone.initialize();
phone.u_phone_manufacturer = current.u_requested_manufacturer();
phone.assigned_to = current.assigned_to();
phone.u_type = current.u_type();
phone.u_color = "blue" ;
phone.insert();
action.setRedirectURL(phone);
action.setReturnURL(current);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2017 10:27 AM
var phone = new GlideRecord('table1');
phone.initialize();
phone.u_phone_manufacturer = current.u_requested_manufacturer;
phone.assigned_to = current.assigned_to;
phone.u_type = current.u_type;
phone.u_color = "blue" ;
phone.insert();
action.setRedirectURL(phone);
action.setReturnURL(current);
can you try like above without parenthesis '()'?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2017 11:36 AM
Yea that worked.
Basically table 1 holds all of the records for physical phones. Table 2 is to request a phone.. so once it gets transferred to table 1 (It gets approved) the record on table 2 will be closed.