The post ExecuteMultipleRequest For Bulk Operation appeared first on CRM Kitchen.
]]>1000
. So, for Online CRM, maximum 1000
requests can be executed at a time.
// Create an ExecuteMultipleRequest object. requestWithResults = new ExecuteMultipleRequest() { // Assign settings that define execution behavior: continue on error, return responses. Settings = new ExecuteMultipleSettings() { ContinueOnError = false, ReturnResponses = true }, // Create an empty organization request collection. Requests = new OrganizationRequestCollection() }; // Create several (local, in memory) entities in a collection. EntityCollection input = GetCollectionOfEntitiesToCreate(); // Add a CreateRequest for each entity to the request collection. foreach (var entity in input.Entities) { CreateRequest createRequest = new CreateRequest { Target = entity }; requestWithResults.Requests.Add(createRequest); } // Execute all the requests in the request collection using a single web method call. ExecuteMultipleResponse responseWithResults = (ExecuteMultipleResponse)_serviceProxy.Execute(requestWithResults); // Display the results returned in the responses. foreach (var responseItem in responseWithResults.Responses) { // A valid response. if (responseItem.Response != null) DisplayResponse(requestWithResults.Requests[responseItem.RequestIndex], responseItem.Response); // An error has occurred. else if (responseItem.Fault != null) DisplayFault(requestWithResults.Requests[responseItem.RequestIndex], responseItem.RequestIndex, responseItem.Fault); }
Here is another example of changing the State and Status of records by ExecuteMultipleRequest.
for (int i = 0; i < records.Entities.Count; i++) { SetStateRequest setStateReq = new SetStateRequest(); setStateReq.EntityMoniker = new EntityReference(); setStateReq.EntityMoniker.Id = records.Entities[i].Id; setStateReq.EntityMoniker.LogicalName = records.Entities[i].LogicalName; setStateReq.State = new OptionSetValue(0); setStateReq.Status = new OptionSetValue(1); req.Requests.Add(setStateReq); } var res = service.Execute(req) as ExecuteMultipleResponse;
More info : https://msdn.microsoft.com/en-us/library/jj863631.aspx
The post ExecuteMultipleRequest For Bulk Operation appeared first on CRM Kitchen.
]]>The post CRM Online 2015 Debugging appeared first on CRM Kitchen.
]]>We use Plugin Registration Tool for deployment and debugging because there is no CRM Developer Toolkit for CRM 2015. If you dont find this tool you can download latest CRM 2015 SDK. Follow the steps to debug plugins registered for online version.
Here creation of Account which trigger the plugin.
The Plugin throws an exception and Business Process Dialog is displayed, click Download Log File and save this file.
Now debug dialog will open and select the file you downloaded ErrorDetails.txt for Profile Location. Then select the Plugin assembly dll where dll and pdb files available to debug.
Open the plugin solution in Visual Studio and then place the break point to debug, attach the debugger to PluginRegistration.exe process.
Also I recommend you to read these posts and video :
I reviewed the article by Guru Prasad which was really helpful in getting this article together.
The post CRM Online 2015 Debugging appeared first on CRM Kitchen.
]]>The post Dynamics CRM 2013 Developer Toolkit for Visual Studio 2013 appeared first on CRM Kitchen.
]]>Normally there is no CRM Developer Toolkit installation file for Visual Studio 2013. But you can install it with some customization.
The post Dynamics CRM 2013 Developer Toolkit for Visual Studio 2013 appeared first on CRM Kitchen.
]]>The post (Resolved) CRM Explorer not showing up on Visual Studio appeared first on CRM Kitchen.
]]>GlobalSection(CRMSolutionProperties) = preSolution SolutionIsBoundToCRM = True EndGlobalSection
The post (Resolved) CRM Explorer not showing up on Visual Studio appeared first on CRM Kitchen.
]]>