Topic by Mai Chi Trung
Hi
I need to open many WorkspaceRecords in my Statusbar Plugin and then, when each of them are Closing, I need to do some cleanup.
The first part is easy for me. I just call .AutomationContext.EditWorkspaceRecord to get the recordContext and then register the closing event.
The problem for me is when the closing event is fired, the sender object is not the RecordContext but something else which can't be cast to RecordContext to get the ID of the workspace record.
I might try to get the CurrentWorkspaceRecord but I'm not quite sure if you just click the close button will Rightnow make that record current. I don't want to refer another dll as it might create problems when I deploy. I don't want to have a WorkspaceAddin as it would require some manual steps to add to workspace and complicate the setup process.
Appreciate any ideas and guidelines to achieve this objective
Thank you and with best regards