How to "Search by Critria" (API) using and extension field
We can use the generic property "Display Name" in the "System.User.Projection" TypeProjection:
{ "Id": "0e1313ab-dc5c-cf9d-d6b0-e2e9835a132a", "Criteria": { "Base": { "Expression": { "SimpleExpression": { "ValueExpressionLeft": { "GenericProperty": "DisplayName" }, "Operator": "Equal", "ValueExpressionRight": { "Value": "John Doe" } } } } } }
However, as soon as we try to use the extended property "Email" (Gathered from using the Cireson View Builder) it looks like it would be like this:
{ "Id": "0e1313ab-dc5c-cf9d-d6b0-e2e9835a132a", "Criteria": { "Base": { "Expression": { "SimpleExpression": { "ValueExpressionLeft": { "GenericProperty": "$Context/Property[Type='CustomSIU_Users_Extensions!ClassExtension_83961915_686c_47a8_93ee_80842f829054']/EmailAddress$" }, "Operator": "Equal", "ValueExpressionRight": { "Value": "John.Doe@email.com" } } } } } }
Can you please explain to me what I am doing wrong, and what the best way to do this would be?
Answers
@Eric_Evans - You're using "GenericProperty". You might try "Property". You might also try using the guid of the class rather than the full SCSM path. Something like this: