get the checkbox status of versionable Item

I have a problem with get property for versionable Item. My server method is trigger with event onAfterVersion Method code: 'Create object innovator Dim innovator As Innovator = Me.newInnovator 'Get current item "part" Dim partItem As Item = innovator.newItem(Me.getType()) partItem.setID(Me.getID()) partItem.setAction("get") partItem.setAttribute("select", "inn_is_total_cost") Dim partItem_re As Item = partItem.apply() Dim isTotalCost As String = partItem_re.getProperty("inn_is_total_cost") I try to lock part > modify something > unlock part (increased version) but isTotalCost is always return value of previous version??? I think it should be value of latest version. I have tried to use config_id and is_current = 1 but it does not working. :(  
Parents
  • Hi there, I can confirm that the boolean value does not seem to be updated yet when this Method is called from an onAfterVersion server event. However, if you change the server event to an onAfterUpdate, this value does seem to be updated properly. If you have additional logic that must take place during a version, you may be able to create an additional Method that checks the value of the "generation" property in an onBeforeUpdate server event. If the value changes in the onAfterUpdate, then you know that the item has been versioned, and you can run your additional logic. Chris _______________ Christopher Gillis Aras Labs Software Engineer
Reply
  • Hi there, I can confirm that the boolean value does not seem to be updated yet when this Method is called from an onAfterVersion server event. However, if you change the server event to an onAfterUpdate, this value does seem to be updated properly. If you have additional logic that must take place during a version, you may be able to create an additional Method that checks the value of the "generation" property in an onBeforeUpdate server event. If the value changes in the onAfterUpdate, then you know that the item has been versioned, and you can run your additional logic. Chris _______________ Christopher Gillis Aras Labs Software Engineer
Children
No Data