-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with ExecuteAction #38
Comments
Hey Chris - have you tried this in a generic tool like Postman to see if it works? I've not used this particular action but will check around to see if anyone has successfully used it |
No, I've not tried that, but I will look into it. I'm suspecting that this particular function is going to be tricky as it takes one of several types for QueryExpression per the documentation, all subclasses of QueryBase and I don't know if JavaScript can "understand" subclasses in the same way that languages like C# can. Do you know how to do this? |
I would try adding '@odata.type':'mscrm.QueryExpression' to the QueryExpression object - I sent a query off to see if Microsoft has an example of the JSon for this particular action |
Using this notation worked - sort of... now it doesn't error out, but I get no records returned in the results. I think this problem has to do with what is in my QueryExpression for Criteria and Filter. I will play with it more and see, but this did the trick for the immediate error I was experiencing.
Cheers!
Chris
…_____________________________
From: David Yack <[email protected]<mailto:[email protected]>>
Sent: Tuesday, May 16, 2017 10:20
Subject: Re: [davidyack/Xrm.Tools.CRMWebAPI] Error with ExecuteAction (#38)
To: davidyack/Xrm.Tools.CRMWebAPI <[email protected]<mailto:[email protected]>>
Cc: Author <[email protected]<mailto:[email protected]>>, Chris Koenig <[email protected]<mailto:[email protected]>>
I would try adding '@odata.type':'mscrm.QueryExpression' to the QueryExpression object - I sent a query off to see if Microsoft has an example of the JSon for this particular action
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#38 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AADg8-Ztumlh1Dji-tDE3jGj62eb0RgOks5r6drJgaJpZM4NXew4>.
|
I was finally able to get this working. There is at least one bug with the Javascript-compatible syntax for the API itself, but the action is now working. Here's my sample code to help close this loop (note: my sample is part of a BotFramework project, and this is coming from my CRM helper class):
What was missing from before was the PageInfo entity. Once I supplied that, I started getting results back. |
I'm getting an error when I execute the action associated with running a full-text search on the KnowledgeArticle entities:
The error returned is:
What I need to be able to do is specify the QueryExpression parameter as a type
Microsoft.CRM.Dynamics.QueryExpression
instead of it's base class,Microsoft.Dynamics.CRM.QueryBase
.Any ideas on how to do this? Hopefully I'm just missing something that should be obvious...
The text was updated successfully, but these errors were encountered: