When a user executed an action, I need to verify that he entered correct data in the items fields and cancel the action if the data is not valid. How can I do this?
A.: You can create a shared client macro that will be triggered by the event that is linked to the status change. The macro will check the data and undo the last action (if the data is not valid) by calling the UndoLastAction method of the AQdevTeamCurrentItem object. Note that the UndoLastAction method does not restore the previous state of an item. It just removes the last record from the item’s Audit Trail list. The following script code demonstrates the use of this method. It removes the last record from the item’s Audit Trail list and reassigns the item to the user who executed the last action. [VBScript] Set Item = AQdevTeamCurrentUIItem Set User = Item.GetHistory.Items(Item.GetHistory.Count-1).User Item.UndoLastAction AQdevTeamCurrentUIItem.
Related Questions
- When a user executed an action, I need to verify that he entered correct data in the items fields and cancel the action if the data is not valid. How can I do this?
- Is data validation performed on any of the fields in the Campaigner List Builder form as it is filled in by a user?
- Can string functions be executed for variable data fields?