This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to set UNSAccountB as Outstanding in vb script in V7 (XmarkedForDeletion)

How to set an UNSAccountB as Outstanding by using a VB Script (XmarkedForDeletion = 2)

Parents
  • Hi Markus

    Thanks this has worked for me. Now I have changed the input value to XObjectKey so tjhat I am able to use the function for groups and assignments too.

    Public Sub CCC_Util_MarkAsOutstanding(XObjectKey As String)

    Dim OKey As New DbObjectKey(XObjectKey)

    Dim e As IEntity

    e = Session.Source.Get(OKey)

    e.State = VI.DB.Entities.EntityState.OutStanding

    Using uow = Session.StartUnitOfWork()

      uow.Put(e)

      uow.Commit()

    End Using

    End Sub

     

Reply
  • Hi Markus

    Thanks this has worked for me. Now I have changed the input value to XObjectKey so tjhat I am able to use the function for groups and assignments too.

    Public Sub CCC_Util_MarkAsOutstanding(XObjectKey As String)

    Dim OKey As New DbObjectKey(XObjectKey)

    Dim e As IEntity

    e = Session.Source.Get(OKey)

    e.State = VI.DB.Entities.EntityState.OutStanding

    Using uow = Session.StartUnitOfWork()

      uow.Put(e)

      uow.Commit()

    End Using

    End Sub

     

Children
No Data