Answered by:
Is it possible to Create multiple Entities in a single request?

Question
-
I need to Create Multiple Contact with a single request. is it possible through webservice? currently i am sending mutliple request to create contacts. ie for each contact send the corresponding request to CRM.
<Create xmlns="http://schemas.microsoft.com/crm/2007/WebServices"> <entity xsi:type="contact" xmlns="http://schemas.microsoft.com/crm/2007/WebServices"> <firstname>test</firstname> <lastname>s3</lastname> <parentcustomerid type="account">{6C641617-1BB2-DD11-945B-000C298B66CD}</parentcustomerid> </entity> </Create>
Pls Help. Pls paste The code.(If Soap XML format available , will be more helpful for me).
Tuesday, June 22, 2010 7:11 AM
Answers
-
Hi,
I think there is no way to create multiple contact like you mentioned.
But as I already said if you need you can create multiple contacts by calling create method in loop by passing attribute array to set contact attributes.
Or you can create CSV file and import that file to create contacts.
Mahain- Marked as answer by DavidJennawayMVP, Moderator Monday, July 26, 2010 2:18 PM
Tuesday, June 22, 2010 7:31 AMModerator
All replies
-
Hi Prasanth,
In Single request what do you mean ???
you can call ms crmwebservice create method in loop to creat multiple contact.
Also you can create array for the attributes to for contact entity, and create contact with those attributes.
Hope it will help you !!!
Mahain- Proposed as answer by Mamatha Swamy Tuesday, June 22, 2010 8:11 AM
Tuesday, June 22, 2010 7:17 AMModerator -
Hi,
I don't think there is any crmService method for batch update.
However, you can create an import file file and then import this file.
see this example. "The following code example shows how to create an import file entity." using SDK.
http://msdn.microsoft.com/en-us/library/cc151195.aspx
http://msdn.microsoft.com/en-us/library/cc150982.aspx
Do u really need to use sdk??
http://blogs.msdn.com/b/crm/archive/2008/03/07/importing-data-in-crm-4-0-made-easier.aspx
Muhammad Ali Khan
http://malikhan.wordpress.comTuesday, June 22, 2010 7:21 AM -
I mean Use Create method for creating multiple contacts. i dont want to call call ms crmwebservice create method in loop to creat multiple contact.
<Create xmlns="http://schemas.microsoft.com/crm/2007/WebServices"> <entity xsi:type="contact" xmlns="http://schemas.microsoft.com/crm/2007/WebServices"> <firstname>Contact1</firstname> <lastname>l1</lastname> <parentcustomerid type="account">{6C641617-1BB2-DD11-945B-000C298B66CD}</parentcustomerid> </entity> <entity xsi:type="contact" xmlns="http://schemas.microsoft.com/crm/2007/WebServices"> <firstname>Contact2</firstname> <lastname>l2</lastname> <parentcustomerid type="account">{6C641617-1BB2-DD11-945B-000C298B66CD}</parentcustomerid> </entity> </Create>
See the above request. thats what i needed ie create contact1,contact2 in single request.. the above code wont work..also you mentioned "Also you can create array for the attributes to for contact entity, and create contact with those attributes." can you pls explain this. pls paste a sample code
Tuesday, June 22, 2010 7:26 AM -
Hi,
I think there is no way to create multiple contact like you mentioned.
But as I already said if you need you can create multiple contacts by calling create method in loop by passing attribute array to set contact attributes.
Or you can create CSV file and import that file to create contacts.
Mahain- Marked as answer by DavidJennawayMVP, Moderator Monday, July 26, 2010 2:18 PM
Tuesday, June 22, 2010 7:31 AMModerator -
Hi,
If you Could you tell us more specifically,what are you trying to implement that will be helpful to provide you better solution.
MahainTuesday, June 22, 2010 7:37 AMModerator