Message 1 of 2
Change file state
Not applicable
12-08-2014
03:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Does anyone know if there's a way to add more comments to the CommArray for a certain state? I would like to be able to keep an existing comment when moving from one state to another. I'm listening to the pre/post-events of DocumentServiceExtensions.UpdateFileLifecycleStateEvents, extracting the "currentComment" in PRE, and trying to write it to the new version of the file in POST:
private string currentComment = "";
void UpdateFileLifecycleStateEvents_Pre(object sender, UpdateFileLifeCycleStateCommandEventArgs e)
{
VaultServiceManager _vltMgr = CommonMain.Instance.VaultServiceManager;
File[] files = _vltMgr.WebServiceManager.DocumentService.GetLatestFilesByMasterIds(e.FileMasterIds);
try
{
currentComment = files[0].Comm;
}
catch (Exception) { }
}
void UpdateFileLifecycleStateEvents_Post(object sender, UpdateFileLifeCycleStateCommandEventArgs e)
{
VaultServiceManager _vltMgr = CommonMain.Instance.VaultServiceManager;
File[] files = _vltMgr.WebServiceManager.DocumentService.GetLatestFilesByMasterIds(e.FileMasterIds);
try
{
files[0].Comm = currentComment;
}
catch (Exception) { }
}
The new state always has it's own predefined comment from the dropdown in the "change state dialog". The e.Comment is "readonly" and not possible to change...And since - is there a way to modify this dialog before it shows?
