-
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
support $batch operations #47
Comments
Until David can get this implemented, feel free to try out my library: xrm-webapi. |
Saw that. Had catalogued all of the APIs as well. Thought you did a good
job but I was not using typescript at the time.
http://msdynamicscrmmeanderings.blogspot.com/2017/05/dynamics-crm-rest-api-choices.html
…On Fri, Sep 29, 2017 at 7:33 PM Derek Finlinson ***@***.***> wrote:
Until David can get this implemented, feel free to try out my library:
xrm-webapi <https://github.com/derekfinlinson/xrm-webapi>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABIOaewvd-RPvaucb7HRLd1ishtlu6xBks5snX42gaJpZM4Pkw8A>
.
|
@aappddeevv is there a particular batch operation you are looking for ? We do support it for Create in the C#, I'm assuming you are looking for it in the JS? @derekfinlinson how are you handling parsing the response? |
Yes, JS is correct.
I need to issue a $batch in order to push a fetchxml query that is too long
to go in the standard http package....it needs to go in the body.
I hacked it up, so it would work: https://pastebin.com/BudCssGe
I eyeballed' Derek's and others lib/examples to make this work.
…On Sat, Sep 30, 2017 at 9:48 AM David Yack ***@***.***> wrote:
@aappddeevv <https://github.com/aappddeevv> is there a particular batch
operation you are looking for ? We do support it for Create in the C#, I'm
assuming you are looking for it in the JS?
@derekfinlinson <https://github.com/derekfinlinson> how are you handling
parsing the response?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABIOaagYF6MngkdrdE5QYNxAwxZQZG5Wks5snkbFgaJpZM4Pkw8A>
.
|
@davidyack I'm not parsing the response at all. Just returning it as JSON. @aappddeevv That's exactly the reason I added it to my library in the first place :) |
I built a scala.js based CLI tool for Dynamics (swiss army knife type of thing) and with that client I had to restructure the client so that one could create "requests" independently of the actual call e.g. make a create request as a separate function that is called inside the actual client.Create(...) method. Then backout a hacked parser to read each section. The batch calls are hard to hack well quickly. If a lib does not expose request making and body parsing then doing batch request/response processing is really hard. |
So for your Fetch need, couldn't we just dynamically switch to Post for long FetchXML queries? |
I don't think you can issue a Post using the entitySet url and the real issue is URL length. FetchXml can be quite large and exceed the server's 2,000 char limit on the URL. If the fetchxml is in a GET inside a batch (with a POST) then the URL limit is not hit. |
@davidyack , we are using your CRMWebApi for our project and i really appreciate your approach.As we are trying to implement $batch request for the large fetchxml to get records by post request in Dotnet Core but unable to get the expected result. Please let us know the right approach to achieve the correct result.
` |
I think your issue is your trying to json convert the body which needs to be just posted as data. look at the https://pastebin.com/BudCssGe that @aappddeevv posted before - it's JS but should give you some insight. I do still plan on adding support for transparently switching to post on the Fetch if it's too big - just haven't had the time to implement it. I also think in many cases I've seen people should simplify their fetches :) |
Thank you for your reply @davidyack . You are right it was json parsing issue. Below code is the implementation of executing large fetch in Dotnet core app: `HttpClient httpClient = new HttpClient();
Alternatively we can also use the belo code:
` |
Hello all, Associate on create is not working with $batch for me, I have raised below issue in the product documentation repo with request/response details. I saw another question about this in stack overflow https://stackoverflow.com/questions/32761311/create-annotation-to-a-contact-entity-in-microsoft-dynamics-crm-by-api Has anyone tried this with $batch? Is that a product issue or something wrong with my request format. I am adding this here because this thread has a very productive discussion about $batch. Please have a look into given links & help me out. Thanks, |
Support $batch requests through the API.
The text was updated successfully, but these errors were encountered: