Home > @i2analyze/notebook-sdk > chart > IRecordChanges
chart.IRecordChanges interface
Detailed information about the specific properties, notes, and source references that changed within a record.
Signature:
interface IRecordChanges
Introduced: version 1.9
Remarks
This interface provides granular change tracking at the property level. Empty sets indicate no changes occurred in that category.
Known Limitations: - Only includes changes for properties that have been fetched. Changes to unfetched properties are not reported here. - Security dimension changes are not included in this interface. - If a record is reported as having changed but recordChanges shows empty sets for all categories, this may indicate unfetched property changes or security-only edits.
Example
// Plugin code consuming recordChanges
chartChangeListener((change) => {
if (change.type === 'minor' && change.recordChanges) {
change.recordChanges.forEach((recordId, changes) => {
// Check for property changes
if (changes.properties?.changed.size > 0) {
console.log('Properties changed:', changes.properties.changed);
}
// Check for note additions
if (changes.notes?.added.size > 0) {
console.log('Notes added:', changes.notes.added);
}
// Check for source reference changes
if (changes.sourceReferences?.changed.size > 0) {
console.log('Source references changed:', changes.sourceReferences.changed);
}
// Check for source reference removals
if (changes.sourceReferences?.removed.size > 0) {
console.log('Source references removed:', changes.sourceReferences.removed);
}
});
}
});
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| notes? | readonly |
{ readonly added: data.IReadOnlyCollection<data.NoteId>; readonly changed: data.IReadOnlyCollection<data.NoteId>; readonly removed: data.IReadOnlyCollection<data.NoteId>; } | (Optional) Gets the note changes for this record. |
| properties? | readonly |
{ readonly added: data.IReadOnlyCollection<schema.PropertyTypeIdentifier>; readonly removed: data.IReadOnlyCollection<schema.PropertyTypeIdentifier>; readonly changed: data.IReadOnlyCollection<schema.PropertyTypeIdentifier>; } | (Optional) Gets the property changes for this record. |
| sourceReferences? | readonly |
{ readonly added: data.IReadOnlyCollection<data.SourceReferenceId>; readonly changed: data.IReadOnlyCollection<data.SourceReferenceId>; readonly removed: data.IReadOnlyCollection<data.SourceReferenceId>; } | (Optional) Gets the source reference changes for this record. |