Modifying and Copying Activity Stream entries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 07:26 AM
1st scenario - A business requirement where we need to transfer existing historical content, that shows in the Activity stream from one case record to another case record.
2nd scenario - Business requirement to update Activity Stream entries with a different created user and create time, to reflect the original creation of the case record.
I understand modifying system fields such as sys_created_by or replicating full audit histories (e.g., field-level changes stored in sys_audit) is not supported and is generally discouraged, especially in production environments. We have a bug scenario where this is needed for a select few records. This is a one fix that is needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 03:35 AM
I don't see why you couldn't copy data from sys_audit to another record like you would any other record.
Just query sys_audit with GlideRecord and insert each row for another record by replacing the key/sys_id for the other one.
You don't even need to copy the history set and lines. You can just delete the existing one and it will generate a new one based on the audit data, so for your second scenario you can just edit the sys_audit record, delete the history set and lines and when you view the record again it should generate new data for you.
Do note that on domain separated instances there's a separate history set for each domain that viewed the record.