Ticket Q415990
Visible to All Users

Criteria current user property

created 13 years ago

Hi, I'm using DC and I implemented more fields to the User, one of them is "DecisionMaker". I need the action "MyAction" is enabled only if the current user is a "DeciosionMaker." I tried the following criteria and did not work:

C#
[Action(PredefinedCategory.View, Caption = "MyAction", SelectionDependencyType = MethodActionSelectionDependencyType.RequireSingleObject, TargetObjectsCriteria = "CurrentUserId().DecisionMaker = true'")] void MyAction();

can you help me?

Answers

created 13 years ago (modified 13 years ago)

Hello,
In version 11.2, you can implement a custom criteria function, as described at http://documentation.devexpress.com/#Xaf/CustomDocument3307
In version 12.1, you can use the following criteria:
"[<NameOfYourGeneratedEntity>][Oid=CurrentUserId()].Single(DecisionMaker)"

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.