question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Batch operation cache issue

See original GitHub issue

var dynamicsWebApi = proEVENTS.WebResource.EventConfigurationHelper.Form.getApiObject();
                    dynamicsWebApi.startBatch();
                    // creates configuration and autonumbers in batch
                    dynamicsWebApi.create(configuration, "new_eventconfigurations");
                    dynamicsWebApi.create(autoNumbers1, "new_eventautonumbers");
                    dynamicsWebApi.create(autoNumbers2, "new_eventautonumbers");
                    dynamicsWebApi.create(autoNumbers3, "new_eventautonumbers");

                    dynamicsWebApi.executeBatch().then(function (responses) {
                        // read responses to fill the lookup
                        var configuration = responses[0];
                        var invitation = responses[1];
                        var registration = responses[2];
                        var event = responses[3];

                        //lookup needs odata
                        var configurationInvitationLookup = {
                            "new_Eventinvitation@odata.bind": "new_eventautonumbers(" + invitation + ")"
                        };

                        // lookup for registration
                        var configurationRegistrationLookup = {
                            "new_Eventregistration@odata.bind": "new_eventautonumbers(" + registration + ")"
                        };

                        // lookup for event
                        var configurationEventLookup = {
                            "new_Event@odata.bind": "new_eventautonumbers(" + event + ")"
                        };
                       
                        // start batch operation to fill the lookups
                        dynamicsWebApi.startBatch();
                        // lookup fill by configuration id, and autonumber id

                        dynamicsWebApi.update(configuration, "new_eventconfigurations", configurationInvitationLookup);
                        dynamicsWebApi.update(configuration, "new_eventconfigurations", configurationRegistrationLookup);
                        dynamicsWebApi.update(configuration, "new_eventconfigurations", configurationEventLookup);
                        
                        dynamicsWebApi.executeBatch().then(function (responsesUpdate) {

                            var serverURL = window.parent.Xrm.Page.context.getClientUrl();
                            $('#conf').attr('src', serverURL + "/main.aspx?etn=new_eventconfiguration&id={" + configuration + "}&newWindow=true&pagetype=entityrecord");
                        })

This code works in batch mode on a button click. Everything runs fine on the first click. if I click it again the update part does not work. If I refresh the page and try again it works but not for the second time. What can be the issue?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
omarranacommented, May 9, 2019

hi @AleksandrRogov thankyou for your comments, you can close the this it was not a bug, i had a create call just before the batch operation, and that conflicted each other. For data protection could you remove your last comment where my prefix is shown? I already edited my original.

0reactions
AleksandrRogovcommented, May 8, 2019

hi @omarrana I tested it in Chrome as well, I did not have any error. can you give me raw requests and responses from CRM? you can catch them using network tab in the developer panel. thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cache Store Batch Operations - Infinispan
Infinispan 9.1.x introduces batch write and delete operations for cache stores. The introduction of batching should greatly improve ...
Read more >
Simplify, Batch, and Cache: How We Optimized Server-side ...
To get a better idea of where the storefront rendering engine spends its time when processing a request, try using the Shopify Theme...
Read more >
Batch Performance Issues Due To Hibernate Cache On ...
On RMB v2.6.0.1.0 against FW v4.3.0.4.0: We are facing performance issue whenever we have a hibernate batched data processed in Algorithms. This ...
Read more >
Batch-file seems to be cached - Stack Overflow
yes, batch files are cached if you try to execute them from a remote computer over the network.
Read more >
Batched HTTP requests may set incorrect `cache-control ...
This means this bug is unlikely to cause incorrect caching in browser or mobile client caches, or in many reverse proxy/CDN caches. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found