tag:blogger.com,1999:blog-14479009.post3140568513881314242..comments2023-11-24T12:30:17.358+01:00Comments on Ronald Lemmen - CRM, C# and Cme: Convert lead to contact, account and/or opportunity programmaticallyRonald Lemmenhttp://www.blogger.com/profile/11930631598114156863noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-14479009.post-82918082922657987452011-09-27T01:44:56.408+02:002011-09-27T01:44:56.408+02:00Just in case no one has notice the properties Moni...Just in case no one has notice the properties Moniker1, Moniker2 and RelationshipName has been deprecated on the AssociateEntitiesRequest class in CRM 2011 on premiseCurtisnoreply@blogger.comtag:blogger.com,1999:blog-14479009.post-44637251301028289242011-01-10T11:52:20.901+01:002011-01-10T11:52:20.901+01:00throwing error at
oppt = (DynamicEntity)rps.Entit...throwing error at <br />oppt = (DynamicEntity)rps.Entity;<br />as "Unable to cast object of type 'WcfCrmService.CrmServiceWsdl.opportunity' to type 'WcfCrmService.CrmServiceWsdl.DynamicEntity'".Anonymoushttps://www.blogger.com/profile/01290573237311728909noreply@blogger.comtag:blogger.com,1999:blog-14479009.post-60464309442096409842010-02-18T20:56:30.443+01:002010-02-18T20:56:30.443+01:00That's just what I wanted to answer ;)
No ser...That's just what I wanted to answer ;)<br /><br />No seriously, great that you figured this out and share this with the other readers of this blog Nick!Ronald Lemmenhttps://www.blogger.com/profile/11930631598114156863noreply@blogger.comtag:blogger.com,1999:blog-14479009.post-80117908197908399712010-02-18T07:09:21.777+01:002010-02-18T07:09:21.777+01:00Figured it out.
Basically convert the InitializeFr...Figured it out.<br />Basically convert the InitializeFromResponse entity to a dynamic entity and add what is missing.<br /><br />Cheers<br />Nick<br /><br />if (entityName == "opportunity")<br />{<br /> DynamicEntity oppt = new DynamicEntity();<br /> oppt = (DynamicEntity)rps.Entity;<br /><br /> //need to set correct status code<br /> StatusProperty stat = new StatusProperty();<Nickhttp://www.readybms.comnoreply@blogger.comtag:blogger.com,1999:blog-14479009.post-1666349138554262052010-02-18T05:46:53.306+01:002010-02-18T05:46:53.306+01:00Hi Ronald
Thanks for this code! I am having the ...Hi Ronald<br /><br />Thanks for this code! I am having the same issue that the previous poster mentioned about not being able to create an opportunity. I took your suggestion and used the traceviewer and discovered the issue is that we have not specified a customer record for the opportunity.<br />"Crm Exception: Message: Customer not specified., ErrorCode: -2147220947"<br /><br />AnyNickhttp://www.readybms.comnoreply@blogger.comtag:blogger.com,1999:blog-14479009.post-87210315856598734662009-12-10T14:19:54.461+01:002009-12-10T14:19:54.461+01:00Hi,
There must be a good reason for CRM to throw ...Hi,<br /><br />There must be a good reason for CRM to throw an error message. Try to enable the trace logging, look into the log (with the trace log viewer) and try to determine the cause of the error. It would be great if you could share the solution here as well for other users as soon as you found the root cause.<br /><br />Good luck!<br />RonaldRonald Lemmenhttps://www.blogger.com/profile/11930631598114156863noreply@blogger.comtag:blogger.com,1999:blog-14479009.post-71232238508106128652009-12-10T00:40:33.188+01:002009-12-10T00:40:33.188+01:00I find your post very helpful... I'm currentl...I find your post very helpful... I'm currently trying to convert a lead to account, contact, and opportunity. However, it gives me an error on the last line (Guid OpportunityID = service.Create(rps.Entity);) while trying to convert to opportunity, it it worked for both account and contact. Any suggestions? Thanks...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-14479009.post-14981984522544594822009-08-04T11:29:18.552+02:002009-08-04T11:29:18.552+02:00Hi J,
There is no need to specify the deletion st...Hi J,<br /><br />There is no need to specify the deletion state code in the webservice. You should enable tracing to find out why the server won't allow you to create the record.<br /><br />RonaldRonald Lemmenhttps://www.blogger.com/profile/11930631598114156863noreply@blogger.comtag:blogger.com,1999:blog-14479009.post-57929444541984423182009-04-10T17:20:00.000+02:002009-04-10T17:20:00.000+02:00Thanks, Ronald. I'm checking into licensing and sh...Thanks, Ronald. I'm checking into licensing and should be okay. <BR/><BR/>One small thing- I am implementing a SSIS solution for creating a lead as you suggested but am running into a 'server unable to process request' which I believe is because I don't populate the DeletionStatusCode field from my input0 in the vb script to create the lead. The problem is, the DeletionStatusCode field does NOT jmollisnoreply@blogger.comtag:blogger.com,1999:blog-14479009.post-2803566801829060132009-04-09T10:18:00.000+02:002009-04-09T10:18:00.000+02:00Hi,I would expect that a single license for an int...Hi,<BR/><BR/>I would expect that a single license for an integration user would be sufficient, just like when you're using a product like Scribe. You should check this with your local Microsoft people though since I'm a developer, no license guru :)<BR/><BR/>Kind regards,<BR/>RonaldRonald Lemmenhttps://www.blogger.com/profile/11930631598114156863noreply@blogger.comtag:blogger.com,1999:blog-14479009.post-76116070683618380982009-04-07T19:46:00.000+02:002009-04-07T19:46:00.000+02:00Thanks for the suggestion, I believe that your met...Thanks for the suggestion, I believe that your method would fit in with what we want to accomplish. I am wondering, though, if there are licensing issues for gathering information from a web site and having an SSIS process pull it in and populate the CRM tables? <BR/><BR/>You've been most helpful.jmollisnoreply@blogger.comtag:blogger.com,1999:blog-14479009.post-18320362807324261732009-04-01T21:06:00.000+02:002009-04-01T21:06:00.000+02:00Hi,The create event will be called as part of the ...Hi,<BR/><BR/>The create event will be called as part of the business logic in the webservice call 'Create'. This means that you should not create the lead directly in the database by using a stored procedure. You should create a small integration program which would copy the lead data from your staging table to the CRM webservices. You can use an SSIS package for this as well, that can talk to Ronald Lemmenhttps://www.blogger.com/profile/11930631598114156863noreply@blogger.comtag:blogger.com,1999:blog-14479009.post-71098670443429823712009-04-01T16:18:00.000+02:002009-04-01T16:18:00.000+02:00I have a peculiar problem: I create leads from a w...I have a peculiar problem: I create leads from a website using a staging database and stored proc that creates a lead. It works. However, I want to set up a workflow for leads that will do a conversion of the lead to account and contact automatically. I can get that to work from the UI but not from a lead created from the staging database (the 'created' event for workflow never seems to get set).jmollisnoreply@blogger.comtag:blogger.com,1999:blog-14479009.post-34280025551158328772008-09-12T16:49:00.000+02:002008-09-12T16:49:00.000+02:00Hello RonaldIn my organization we want to qualify ...Hello Ronald<BR/><BR/><BR/>In my organization we want to qualify leads to accounts and set automatically the account field (relantionship) as lead.<BR/>Can you help me?<BR/>Best Regards <BR/><BR/>Ana PintoAnonymousnoreply@blogger.com