Conditionals In Actions Calls - Unfied Service Desk RRS feed

  • Question

  • Hello guys! 

    I'm building an application using CRM 2013 Unified Service Desk (USD). Right now, I'm creating a conditional action call from a hosted control to another. So far I got it working with a single expression, like:

    "[[Data1]]" == "Value1"

    But I've gone further down the rabbit's hole and now I need to query two values with an OR operator:

    "[[Data1]]" == "Value1" || "[[Data2]]" == "Value2"

    While the first example works fine, using the || operator does not. I've already tried using some variations, like expr OR expr, but the evaluation fails. 

    There's no documentation on MSDN covering the conditional part of an action call, so I need help figuring this one out.

    Thursday, March 5, 2015 10:40 PM

All replies

  • So, after a little experimenting, I realized that the issue was not with the logical operators but with a boolean representation instead. true and false are capitalized in USD conditionals: "[[Data1]]" == "Value1" || "[[Data2]]" == "True" But the rest of the expression was valid, so you can combine and use logical ORs ("||") and logical ANDs ("&&") just as you'd do in C#.
    Friday, March 6, 2015 5:35 PM