var CustDetails = CustInfo.findAgentInfo("X", "003");
//This CustDetails has nearly 5000 to 10000 records.These records i need to save to the "TestConactList"
custom entity. The below code is working fine.
but each time the service will excute and created record.
I want one strecth need to create (bult insert in custom entity)
Entity TestList = new Entity("TestConactList");
if (CustDetails != null)
{
foreach (var _CustInfo in CustDetails)
{
TestList["name1"] = _CustInfo.name1.ToString();
TestList["address1"] = _CustInfo.addrs1.ToString();
TestList["address2"] = _CustInfo.addrs2.ToString();
TestList["zipcode"] = _CustInfo.zip.ToString();
TestList["city"] = _CustInfo.city.ToString();
TestList["accounttype"] = Accounttype;
TestList["Agent"] = new EntityReference("agent", AgentBroker.Id);
service.Create(TestList);
}
}
*This post is locked for comments
Hi
Use executle multiple to upload the bulk of data
Check this links
Hello,
You should consider usage of ExecuteMultipleRequest/ExecuteMultipleResponse - msdn.microsoft.com/.../jj863631.aspx
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156