===============================
This example is now obsolete. Instead, use the built-in CurrentUserId criteria function.
===============================
This example shows how to implement a ViewController, containing Actions, that will be active only in the "My Details" window.
In order to do this, we will set the TargetViewId property either of the ViewController or Action objects at design time. Take special note that this Id will vary against the type of the Security System (Simple or Complex) used in the application, because there are different user types for them.
To solve this problem in a more elegant way, we will also configure an Action at runtime, but set its properties against the properties of the SecuritySystem singleton.
See Also:
How to remove or hide (deactivate, disable) a button ( Action ) from tool bar
ActionBase.TargetObjectsCriteria