promote() method

オフライン
Within a VB method being called on BeforeAdd for an Item, what is the proper syntax to promote new items to a specific Lifecycle state initially? Me.setAction("promoteItem") Me.setProperty("state",stateX) or Me.promote(???,StateX)
  • Either of those options would be acceptable. I should point out that the code snippets above are not actually completely identical. If you setAction and state, you must also do Me.Apply() to ensure the promotion is completed. In addition, the second option should be Me.promote(StateX, "Some optional comment to store in the history record, if applicable.")
  • Hello, The promote method available from Items is just a convenient shorthand to save time from manually setting the action and state of the item, but both of the code samples you've provided will make the same call to the server in the end. Because of this, there's no "proper" syntax for promoting an item, but I'd recommend using Item.promote for clarity and simplicity. Chris
    Christopher Gillis Aras Labs Software Engineer