How to get Old Field Values that have been hidden for the projects which once had old field values?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2023 12:13 PM
I am working a project table. Project has a field 'X' which had field values. These Values were hidden and New Values were in place. Now Most of the old values are not present in the list view or form for the projects. How do you bring them back in those projects?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2023 12:34 PM
Have the fields containing the old values been inactivated, or just hidden?
If you go to the form view of a record, and click the 'hamburger' on the upper right, can you see the 'missing' fields and values in the XML?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2023 06:12 AM
I am able to see the old values but I am not sure how to bulk update the old values to new values as the old values are only visible in audit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2023 06:51 AM
Well it would be a GlideRecord query, but I have no idea what table you're talking about or the field names.
As long as the fields are valued, you can get the name form the XML too, and fill in the blanks below:
var changeRec = new GlideRecord('mystery_project_table_name');
changeRec.addEncodedQuery("mystery_query_for_the_records_you_want_to_update"); //get from a List query
changeRec.query();
while (changeRec.next()){
changeRec.old_field = changeRec.new_field;
changeRec.update();
}