<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Change file state in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/change-file-state/m-p/5436425#M9891</link>
    <description>&lt;P&gt;The comments are part of the lifecycle and are fully customizable.&amp;nbsp; You don't need to write code to customize them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Vault Explorer, go to Tools &amp;gt;&amp;gt; Administration &amp;gt;&amp;gt; Vault Settings &amp;gt;&amp;gt; Behaviors tab &amp;gt;&amp;gt; "Lifecycles ..." button &amp;gt;&amp;gt; choose lifecycle and press Edit to bring up the dialog (see attached screenshot). Each state has a list of comments (shown in the "Comments" tab on the right).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Dave&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Dec 2014 19:54:15 GMT</pubDate>
    <dc:creator>minkd</dc:creator>
    <dc:date>2014-12-08T19:54:15Z</dc:date>
    <item>
      <title>Change file state</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/change-file-state/m-p/5435785#M9890</link>
      <description>&lt;P&gt;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&amp;nbsp;DocumentServiceExtensions.UpdateFileLifecycleStateEvents, extracting the "currentComment" in PRE, and trying to write it to the new version of the file in POST:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;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) { }
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;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) { }
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2014 11:43:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/change-file-state/m-p/5435785#M9890</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-08T11:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Change file state</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/change-file-state/m-p/5436425#M9891</link>
      <description>&lt;P&gt;The comments are part of the lifecycle and are fully customizable.&amp;nbsp; You don't need to write code to customize them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Vault Explorer, go to Tools &amp;gt;&amp;gt; Administration &amp;gt;&amp;gt; Vault Settings &amp;gt;&amp;gt; Behaviors tab &amp;gt;&amp;gt; "Lifecycles ..." button &amp;gt;&amp;gt; choose lifecycle and press Edit to bring up the dialog (see attached screenshot). Each state has a list of comments (shown in the "Comments" tab on the right).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Dave&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2014 19:54:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/change-file-state/m-p/5436425#M9891</guid>
      <dc:creator>minkd</dc:creator>
      <dc:date>2014-12-08T19:54:15Z</dc:date>
    </item>
  </channel>
</rss>

