API Query Business Services
I'm desperately trying to make a simple api post call on a specific Business Service CI, is this specific API only exclusive for certain projection types? Or am I doing something wrong?
I'm getting error Uncaught (in promise)
$.ajax({ type: "POST", url: '/api/V3/Projection/GetProjectionByCriteria', data: JSON.stringify({ "Id": "8c62f1d6-1bd6-3750-dbf3-cbd5eeb3a9dc", "Criteria": { "Base": { "Expression": { "SimpleExpression": { "ValueExpressionLeft": { "Property": "$Context/Property[Type='b2a806a6-87f6-0bc9-da74-c27e9ab5a5d7']/9795955e-de76-a851-997c-706723f190a9$" }, "Operator": "Equal", "ValueExpressionRight": { "Value": "some app" } } } } } }), dataType: "json", contentType: "application/json; charset=utf-8", success: function(data){ console.log(data); }, error: function(error){ console.log(error); } });
Best Answer
-
joivan_hedrick Cireson Consultant Advanced IT Monkey ✭✭✭
Interesting find. I'm getting the same behavior on first glance, with it not liking the GUIDs for the "classID/propertyID". But they appear to be correct, and other classes seem to work. For a quick workaround, are you able to use a generic property like DisplayName in your criteria?
"ValueExpressionLeft": { "GenericProperty": "DisplayName" },
5
Answers
Interesting find. I'm getting the same behavior on first glance, with it not liking the GUIDs for the "classID/propertyID". But they appear to be correct, and other classes seem to work. For a quick workaround, are you able to use a generic property like DisplayName in your criteria?
Thank you! That worked!
Ok so it is supposed to work for every CI I guess then, good to clear that out before going down the rabbit hole of try and error :D