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)
Parents
  • 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
Reply
  • 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
Children
No Data