<?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 Strange behavior of ItemRollbackLifeCycleStatesEvents.GetRestrictions in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6982539#M7635</link>
    <description>&lt;P&gt;I am trying to restrict item rollbacks to a certain group of users on items with a specific custom item category. When I execute an item rollback with the code below, I get:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Roll Back Lifecycle State Change dialog box and click YES.&lt;/LI&gt;&lt;LI&gt;Get an error dialog that states, “Object reference not set to an instance of an object” and click OK.&lt;/LI&gt;&lt;LI&gt;My message box displays with “Has ASME Privilege: False” and I click OK.&lt;/LI&gt;&lt;LI&gt;Roll Back Lifecycle State Change Failed dialog box is displayed listing the restriction.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;However, if I comment out the dim statement and the second message box statement and uncomment the first message box statement, my message box with the item ID will display and then the Roll Back Lifecycle State Change Failed dialog box but no “Object reference” error message. It seems like I can’t call any custom sub or function inside the ItemRollbackCheck Sub without getting the error.&amp;nbsp; I need to get a Boolean value in if the current user is part of an approved group and I need a way to get the current item category.&amp;nbsp; I can get the item ID easy enough within the sub but can’t do anything with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Sub OnLoad() Implements Autodesk.Connectivity.WebServices.IWebServiceExtension.OnLoad&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddHandler ItemService.ItemRollbackLifeCycleStatesEvents.GetRestrictions, AddressOf ItemRollbackCheck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub ItemRollbackCheck(ByVal sender As Object, ByVal e As ItemRollbackLifeCycleStateCommandEventArgs)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim approved As Boolean = HasASMEPrivilege(approvedgroup)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'MessageBox.Show("ItemId: " &amp;amp; e.ItemIterationId.ToString) 'this works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show("Has ASME Privilege: " &amp;amp; approved) ' errors first, then displays this message box&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim restrict As ExtensionRestriction = New ExtensionRestriction(e.ItemIterationId.ToString, "No Permission")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.AddRestriction(restrict)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'MessageBox.Show(ex.Message)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2017 19:45:05 GMT</pubDate>
    <dc:creator>John204</dc:creator>
    <dc:date>2017-03-29T19:45:05Z</dc:date>
    <item>
      <title>Strange behavior of ItemRollbackLifeCycleStatesEvents.GetRestrictions</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6982539#M7635</link>
      <description>&lt;P&gt;I am trying to restrict item rollbacks to a certain group of users on items with a specific custom item category. When I execute an item rollback with the code below, I get:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Roll Back Lifecycle State Change dialog box and click YES.&lt;/LI&gt;&lt;LI&gt;Get an error dialog that states, “Object reference not set to an instance of an object” and click OK.&lt;/LI&gt;&lt;LI&gt;My message box displays with “Has ASME Privilege: False” and I click OK.&lt;/LI&gt;&lt;LI&gt;Roll Back Lifecycle State Change Failed dialog box is displayed listing the restriction.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;However, if I comment out the dim statement and the second message box statement and uncomment the first message box statement, my message box with the item ID will display and then the Roll Back Lifecycle State Change Failed dialog box but no “Object reference” error message. It seems like I can’t call any custom sub or function inside the ItemRollbackCheck Sub without getting the error.&amp;nbsp; I need to get a Boolean value in if the current user is part of an approved group and I need a way to get the current item category.&amp;nbsp; I can get the item ID easy enough within the sub but can’t do anything with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Sub OnLoad() Implements Autodesk.Connectivity.WebServices.IWebServiceExtension.OnLoad&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddHandler ItemService.ItemRollbackLifeCycleStatesEvents.GetRestrictions, AddressOf ItemRollbackCheck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub ItemRollbackCheck(ByVal sender As Object, ByVal e As ItemRollbackLifeCycleStateCommandEventArgs)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim approved As Boolean = HasASMEPrivilege(approvedgroup)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'MessageBox.Show("ItemId: " &amp;amp; e.ItemIterationId.ToString) 'this works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show("Has ASME Privilege: " &amp;amp; approved) ' errors first, then displays this message box&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim restrict As ExtensionRestriction = New ExtensionRestriction(e.ItemIterationId.ToString, "No Permission")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.AddRestriction(restrict)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'MessageBox.Show(ex.Message)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 19:45:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6982539#M7635</guid>
      <dc:creator>John204</dc:creator>
      <dc:date>2017-03-29T19:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Strange behavior of ItemRollbackLifeCycleStatesEvents.GetRestrictions</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6983528#M7636</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be able to call any function or sub from inside the event handler. Are you sure 'approvedgroup' is declared and not empty? This could be causing the 'object not set ..' error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get to the item cateogry by using the CategoryService. You need to add the code below to get a reference to the WebServiceManager.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim connection As IWebService = DirectCast(sender, IWebService)
Dim item As Item = connection.WebServiceManager.ItemService.GetItemsByIds(New Long() {e.ItemIterationId}).FirstOrDefault()
Dim itemCat As ItemCat = item.Cat
Dim itemCatName As String = itemCat.CatName&lt;/PRE&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 07:43:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6983528#M7636</guid>
      <dc:creator>psaarloos</dc:creator>
      <dc:date>2017-03-30T07:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Strange behavior of ItemRollbackLifeCycleStatesEvents.GetRestrictions</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6984452#M7637</link>
      <description>&lt;P&gt;Hi Pim,&lt;/P&gt;&lt;P&gt;Thank you for the response. I have the following lines at the top of my class:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Const approvedgroup As String = "ASME Engineering"&lt;/P&gt;&lt;P&gt;Private _connection As Autodesk.DataManagement.Client.Framework.Vault.Currency.Connections.Connection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore, I do have approvedgroup defined but even when I hardcode “ASME Engineering” into the function argument, I still get the error. If I comment everything out, paste in your code for getting the item category, and then display it in a message box, everything is fine.&amp;nbsp; This leads me to believe there is an issue with the HasASMEPrivilege function and how I have it written.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Function HasASMEPrivilege(ByVal appgrp As String) As Boolean&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim approvedflag As Boolean = False&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Pass in a group name and get back a group object for GetGroupByName. UserRead if logged in user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'is a member of the group. Otherwise AdminUserRead is required or a 303 error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '(permission denied) is thrown. This means that only members of approvedgroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' or a member of the Administrators group will have ASME privileges.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim objGroup = _connection.WebServiceManager.AdminService.GetGroupByName(approvedgroup)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If objGroup Is Nothing Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; approvedflag = False&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; approvedflag = True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ex.Message.ToString = "303" Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; approvedflag = False&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(ex.Message)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return approvedflag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There may be a better way of doing this but I needed to determine the group of the currently logged in user. I did not want to open a new connection with admin privileges which I think will consume another license so I used GetGroupByName which will allow read if the user is a member of the group but throw an error if he isn’t.&amp;nbsp; I trap the error if they are not a member of the group and return False.&amp;nbsp; I think the problem may be with my dim objGroup statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your assistance.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 13:34:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6984452#M7637</guid>
      <dc:creator>John204</dc:creator>
      <dc:date>2017-03-30T13:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Strange behavior of ItemRollbackLifeCycleStatesEvents.GetRestrictions</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6984555#M7638</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically looks all good. Opening another connection with a different user doesn't consume a second license anymore with the new licensing mechanism of Vault 2017, but still testing with a try..catch is the most easiest. I've re-written your function a bit. Can you give it a go?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Call it with 'Dim approved as Boolean = HasASMEPrivilege("ASME Engineering")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Private Function HasASMEPrivilege(ByVal appgrp As String) As Boolean

            Dim result As Boolean = False

            Try

                'Pass in a group name and get back a group object for GetGroupByName. UserRead if logged in user
                'is a member of the group. Otherwise AdminUserRead is required or a 303 error
                '(permission denied) is thrown. This means that only members of approvedgroup
                ' or a member of the Administrators group will have ASME privileges.

                Dim objGroup = _connection.WebServiceManager.AdminService.GetGroupByName(appgrp)
                result = True

            Catch ex As Exception

            End Try

            Return result

        End Function&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Mar 2017 13:56:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6984555#M7638</guid>
      <dc:creator>psaarloos</dc:creator>
      <dc:date>2017-03-30T13:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Strange behavior of ItemRollbackLifeCycleStatesEvents.GetRestrictions</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6984687#M7639</link>
      <description>&lt;P&gt;Hi Pim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your revised function works great, no errors. A much better job than my clumsy attempt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the information on the licensing. We do have Vault 2016, would that version consume another license if I opened another connection with admin privileges?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 14:29:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6984687#M7639</guid>
      <dc:creator>John204</dc:creator>
      <dc:date>2017-03-30T14:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Strange behavior of ItemRollbackLifeCycleStatesEvents.GetRestrictions</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6984786#M7640</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Glad to hear it works! Vault 2016 will indeed consume two licenses if you make multiple (writeable) connection with different users. Big improvement of Vault 2017!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 14:55:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6984786#M7640</guid>
      <dc:creator>psaarloos</dc:creator>
      <dc:date>2017-03-30T14:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Strange behavior of ItemRollbackLifeCycleStatesEvents.GetRestrictions</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6984852#M7641</link>
      <description>&lt;P&gt;Hi Pim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for that info and for all your help.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 15:06:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/strange-behavior-of-itemrollbacklifecyclestatesevents/m-p/6984852#M7641</guid>
      <dc:creator>John204</dc:creator>
      <dc:date>2017-03-30T15:06:07Z</dc:date>
    </item>
  </channel>
</rss>

