This may be a bit more of a problem than it may seem. Editor parts are the mechanism, that is for sure - this is what you should research if you are not sure how to add custom and complex properties to the property pane of the web part. This will allow you to add a dropdown with data from a custom source (CRM in this instance).
However, the big question is how you plan to perform the actual query against CRM to get the customer names. Since CRM and SharePoint, I am assuming, are on different servers, you will have a "double-hop" - the page editor sends his credentials to SharePoint, but SharePoint will not forward those credentials to the CRM server unless you are using Kerberos (are you?) If you are not using Kerberos authentication, your web part will have to impersonate a system account that has permissions to CRM. As for actually getting the data from CRM, I would suggest you stick to the CRM web services. The "RetrieveMultiple" method (http://msdn.microsoft.com/en-us/library/aa680905.aspx) should help you get a collection of the crm entities you are after (companies). Also see Building Queries: http://msdn.microsoft.com/en-us/library/aa680438.aspx Note that the double hop issue is not unique to the editor part. Your custom web part itself will have the same issues if it is supposed to connect to CRM. Your question made me think of writing an article about editor parts and how to use them. If I have the time I will blog about it and send you the link in this forum. Ishai Sagi Solution Architect Information Management MVP Microsoft Office SharePoint Server Direct: 02 8001 7717 Fax: 02 8001 7778 Mobile: 0423 791 728 Email: [EMAIL PROTECTED] Web: www.uniqueworld.net Blog: www.sharepoint-tips.com innovative business solutions that make a difference -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yann Duran Sent: Monday, 9 June 2008 10:57 AM To: [email protected] Subject: RE: [OzMOSS] custom web parts with sql Chris, You can do this in two ways. Webparts have all this already built in, you just have to "hook it up", so to speak. The simplest way is to expose a public property & decorate it with two attributes "Personalizable(true)" & "Browsable(true)" (you can replace the "true" in the Personalizable attribute with "PersonalizationScope.Personal" or "PersonalizationScope.Shared"). Or, you can create a custom EditorPart, which requires a bit more work, but gives you greater control. If you google for "EditorPart" you'll find a wealth of information & examples to get you going. If you have trouble finding what you need, I'll see if I can find something for you. Hope that helps, Yann -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Grist Sent: Monday, 9 June 2008 9:31 AM To: [email protected] Subject: [OzMOSS] custom web parts with sql Hi Guys, In the next couple of weeks i am going to be doing some BDC stuff revolving around a simple CRM system. The basic layout they want is a site for each different company in the CRM. What i would like to do is display that company information in my own layout in a custom webpart. Which should be pretty simple, so thats fine. What i would like to add though is the option for the user to select what company the web part focuses on. I.e. in the modify web part options: Select Company: drop down of company names from something like select company.name from company; then when they select a specific company.name from the drop down it will set a variable equal to company.id so this can be used for other querys to get the specific address etc of that company. I was wondering if there was any examples of this anywhere because ive come up blank so far. But i would imagine this happens in quite a few webparts and would be something useful to know how to do. Thanks again for any help. IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail. If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party. This email represents the views of the individual sender, which do not necessarily reflect those of education.au limited except where the sender expressly states otherwise. It is your responsibility to scan this email and any files transmitted with it for viruses or any other defects. education.au limited will not be liable for any loss, damage or consequence caused directly or indirectly by this email. ------------------------------------------------------------------- OzMOSS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com ------------------------------------------------------------------- OzMOSS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com ------------------------------------------------------------------- OzMOSS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com
