Software Information |
|
Microsoft CRM Customization Secrets - Second Edition
This article is for advanced Microsoft CRM SDK C# developers. It describes the technique of direct SQL programming, when SDK doesn't have the functionality to do the job. Introduction. Looks like Microsoft CRM becomes more and more popular, partly because of Microsoft muscles behind it. Now it is targeted to the whole spectrum of horizontal and vertical market clientele. It is tightly integrated with other Microsoft Business Solutions products such as Microsoft Great Plains, Solomon, Navision (the last two in progress). Here we describe the technique of creating closed activity-email using MS CRM SDK and direct SQL programming. Imaging something like this. You need to handle incoming email before it is committed to MS Exchange database. You need to analyze if incoming email doesn't have GUID in its Subject (GUID will allow MS CRM Exchange Connector to move email to Microsoft CRM and attach it to the Contact, Account or Lead) - then you still need to lookup MS CRM in case if one of the accounts, contacts or leads has email address that matches with sender email address - then you need to create closed activity-email in MS CRM, attached to the object and placed into general queue. How to create MS Exchange handler is outside of the scope, please see this article: Now the code below is classical MS CRM SDK and it will create activity email: public Guid CreateEmailActivity(Guid userId, int objectType, Guid objectId, string mailFrom, CRMUser crmUser, string subject, string body) { try { log.Debug("Prepare for Mail Activity Creating"); // BizUser proxy object Microsoft.Crm.Platform.Proxy.BizUser bizUser = new Microsoft.Crm.Platform.Proxy.BizUser(); ICredentials credentials = new NetworkCredential(sysUserId, sysPassword, sysDomain); bizUser.Url = crmDir + "BizUser.srf"; bizUser.Credentials = credentials; Microsoft.Crm.Platform.Proxy.CUserAuth userAuth = bizUser.WhoAmI(); // CRMEmail proxy object Microsoft.Crm.Platform.Proxy.CRMEmail email = new Microsoft.Crm.Platform.Proxy.CRMEmail(); email.Credentials = credentials; email.Url = crmDir + "CRMEmail.srf"; // Set up the XML string for the activity string strActivityXml = ""; strActivityXml += ""; strActivityXml += "") + "]]>"; strActivityXml += ""; strActivityXml += userId.ToString("B") + ""; strActivityXml += ""; // Set up the XML string for the activity parties string strPartiesXml = ""; strPartiesXml += ""; strPartiesXml += "" + crmUser.GetEmailAddress() + ""; strPartiesXml += "" + Microsoft.Crm.Platform.Types.ObjectType.otSystemUser.ToString() + ""; strPartiesXml += ""+ crmUser.GetId().ToString("B") + ""; strPartiesXml += ""; strPartiesXml += Microsoft.Crm.Platform.Types.ACTIVITY_PARTY_TYPE.ACTIVITY_PARTY_TO_RECIPIENT.ToString(); strPartiesXml += ""; strPartiesXml += ""; strPartiesXml += ""; strPartiesXml += "" + mailFrom + ""; if (objectType == Microsoft.Crm.Platform.Types.ObjectType.otAccount) { strPartiesXml += "" + Microsoft.Crm.Platform.Types.ObjectType.otAccount.ToString() + ""; } else if (objectType == Microsoft.Crm.Platform.Types.ObjectType.otContact) { strPartiesXml += "" + Microsoft.Crm.Platform.Types.ObjectType.otContact.ToString() + ""; } else if (objectType == Microsoft.Crm.Platform.Types.ObjectType.otLead) { strPartiesXml += "" + Microsoft.Crm.Platform.Types.ObjectType.otLead.ToString() + ""; } strPartiesXml += ""+ objectId.ToString("B") + ""; strPartiesXml += ""; strPartiesXml += Microsoft.Crm.Platform.Types.ACTIVITY_PARTY_TYPE.ACTIVITY_PARTY_SENDER.ToString(); strPartiesXml += ""; strPartiesXml += ""; strPartiesXml += ""; log.Debug(strPartiesXml); // Create the e-mail object Guid emailId = new Guid(email.Create(userAuth, strActivityXml, strPartiesXml)); return emailId; } catch (System.Web.Services.Protocols.SoapException e) { log.Debug("ErrorMessage: " + e.Message + " " + e.Detail.OuterXml + " Source: " + e.Source); } catch (Exception e) { log.Debug(e.Message + "" + e.StackTrace); } return new Guid(); } Our credits to Anna Osborn (so obviously small pocket aquarium goes to her - smile!), she let us know how to close MS CRM Activity: //creates the activity strActivityId = oActivity.Create(userAuth, strXml, activityPartyXml); //closes it as long as the relevant fields are complete oActivity.Close(userAuth, strActivityId, -1); But in any case whatever you find below could help you to do whatever CRM SDK can't. Now I would like to share the trick with you - there is no method to make this activity closed in MS CRM SDK 1.2 (if somebody knows the one - I owe you small pocket aquarium - smile!). Obviously Microsoft doesn't support if you do direct SQL programming bypassing SDK. However I would say this is not direct objects creation - this is rather flags correction. So here is what we have - this procedure will do the job and make activity closed: public void UpdateActivityCodes(Guid emailId) { try { OleDbCommand command = conn.CreateCommand(); command.CommandText = "UPDATE ActivityBase SET DirectionCode = (?), StateCode = (?), PriorityCode = (?) WHERE ActivityId = (?)"; command.Prepare(); command.Parameters.Add(new OleDbParameter("DirectionCode", Microsoft.Crm.Platform.Types.EVENT_DIRECTION.ED_INCOMING)); command.Parameters.Add(new OleDbParameter("StateCode", Microsoft.Crm.Platform.Types.ACTIVITY_STATE.ACTS_CLOSED)); command.Parameters.Add(new OleDbParameter("PriorityCode", Microsoft.Crm.Platform.Types.PRIORITY_CODE.PC_MEDIUM)); command.Parameters.Add(new OleDbParameter("ActivityId", emailId)); log.Debug("Prepare to update activity code " + emailId.ToString("B") + " in ActivityBase"); command.ExecuteNonQuery(); } catch(Exception e) { log.Debug(e.Message + "" + e.StackTrace); } } Happy customizing! if you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com About The Author Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies - USA nationwide Microsoft CRM, Microsoft Great Plains customization company, based in Chicago, Arizona, California, Colorado, Texas, New York, Georgia, Florida, Canada, UK, Australia and having locations in multiple states and internationally , he is Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer; akarasev@albaspectrum.com
MORE RESOURCES: Open-Source Software Is in Crisis IEEE Spectrum Artificial intelligence software at Zuckerberg S.F. General Hospital helps flag stroke risk San Francisco Chronicle London startup Agemo has exited stealth. Now, it's building AI reasoning for software to take on Poolside and Magic. Business Insider Keysight Providing Software to Enable Researchers through the Microelectronics Commons Business Wire Business Insider's Rating Methodology for Tax Software Business Insider RatedPower expands efficiency and precision with solar project design software release - PR Newswire AV Unveils Advanced Software Updates to Enhance Puma UAS Capabilities in Contested Environments Business Wire The Generative Software Cycle is Here: OutSystems Introduces the Power of Low-Code x AI Business Wire Schrödinger Announces Multi-Target Collaboration and Expanded Software Licensing Agreement with Novartis Business Wire Anduril Lattice Software Enhances US CENTCOM Air Defense Exercise The Defense Post TestSprite nabs $1.5M to build autonomous AI software testing platform SiliconANGLE News LEAP, globally popular software for energy, climate mitigation, and air pollution planning, to be offered free to an additional 54 countries Stockholm Environment Institute Salesforce Loses Top Artificial Intelligence Executive, Says Analyst Investor's Business Daily AI-based ARIA detection software could bring 'renewed hope' for people undergoing Alzheimer's treatment Health Imaging DMDE review: How good is this free data recovery software? Digital Trends EasyODM Launches AI-Powered Machine Vision Software Vision Systems Design Epic software helps veterans access VA benefits Verona Press Joget Earns GovStack Software Requirements Compliance ENGINEERING.com Enterprise Software in the Age of Generative AI GP Bullhound Fast 50 2024: Fearless aims beyond software after first acquisition The Business Journals Exclusive | FBI used ‘software tools’ to search social media for election-related talk: analyst New York Post Precisely Named a Leader in IDC MarketScape: Worldwide Data Intelligence Platform Software, 2024 Morningstar Best Human Resources Software - 2024 Reviews & Pricing Software Advice Amundi buys wealth software firm Aixigo Financial News KIC Launches Game-Changing TAS Software Platform to Address Emerging Thermal Process Challenges AZoRobotics Take-Two Interactive Software Chief Financial Officer Lainie Goldstein Sells 35% Of Holding Simply Wall St Aviation Software Market Revenue to Attain USD 21.55 Bn by 2033 Precedence Research Samsung Galaxy S25 to offer 7 years of One UI software updates: Will you use it for that long? Sammy Fans Indian payments platform Razorpay launches B2B software fund - Global Corporate Venturing Danfoss Power Solutions launches ACL 3.2 software Industrial Vehicle Technology International PTV updates truck route-planning software Traffic Technology Today MSU, Web Software Engineer II, Bozeman Daily Chronicle From self-driving cars to AI that writes enterprise software: Cogna founder raises $15M - TechCrunch Montclair Council Passes Cell-Tower Ordinance, Tables Storm Water Regulation and Software Agreement TAPinto.net The Intellectual Property Software Market Reach USD 31.3 Billion by 2032 Growing with 15.6% CAGR EIN News Snyk founder’s Tessl raises $125M to revolutionise AI native software creation with spec-centric model Tech Funding News Danfoss software enables autonomous control Power Progress Forrester recognizes Black Duck as a Leader in software composition analysis Security Boulevard |
RELATED ARTICLES
Microsoft Small Business Manager Customization Options - Overview Microsoft Business Solutions Small Business Manager is Great Plains Dexterity based application and successor and small business market niche version of Microsoft Great Plains. Microsoft Great Plains itself has variety of customization and integration tools: Integration Manager, VBA/Modifier, Great Plains Dexterity, SQL Server stored procedures to name a few. C++ Tutorial 2, Input and Variables This is the tutorial where we really get into programming. Input and variables are the essence of programming. Microsoft Great Plains: Data Conversion & Migration Scenarios - Overview for Consultant Microsoft Business Solutions Great Plains serves multiple industries in the US, plus it has strong presence in Latin America, U.K. Navision Customization: C/SIDE, C/ODBC, C/FRONT, XBRL - Development Options Microsoft bought Navision, Denmark based software development company, along with Great Plains Software. Now Microsoft Business Solutions offers following ERP applications: Navision (former Navision Attain), Microsoft Great Plains (former Great Plains Dynamics/eEnterprise), Solomon, Axapta. Four Desktop Tools To Drastically Increase Your Productivity Sticky Noteshttp://www.deprice. Tools for Customizing Great Plains Microsoft Business Solutions - Great Plains has captured the US market with its integrated business applications for small and mid-size organizations. Its comprehensive accounting and business management capabilities provide businesses with tools to customize various modules of the Great Plains software. Microsoft Great Plains Integration Manager - Advanced Techniques Great Plains Integration Manager scripting and translation - overview for programmer, software developer, database administrator, IT specialistMicrosoft Business Solutions main middle market ERP application - Microsoft Great Plains has multiple integration options: MS SQL Scripting (stored procedures and views), ADO.Net programming, Microsoft SQL Server DTS packages. Cross-Platform Custom Software Development & Integration - IT Strategy for Large Corporation Microsoft Business Solutions products: Great Plains, MS CRM, Navision, Axapta, MS RMS integration with UNIX/Java based platforms & non-Microsoft applications: Oracle, Lotus Notes/Domino, DBII, PeopleSoft, SAPThe history of software application development indicates that global trends to unification might be reversed in the future. If you take a look at C programming language, intended as cross platform solution (which resolves graphical interface cross platform migration). OSI Layers Model IntroductionDuring the early years of our modern computer era, very few standards and protocols existed between various manufacturers. However, as time went on and computer technology continued to improve and become more widespread, it became apparent that standards would be necessary to ensure compatibility. When is a Software Engineer Not a Software Engineer? The title of "software engineer" has got to be among the most highly abused in the corporate high-tech world. It's also one of the most popular. Programming Language Migration Path While I was preparing some personal background information for a potential client, I was reviewing all the programming languages that I have had experience with. I list languages that I'm most experienced with on my resume. Internet Faxing Service Review The Internet is reshaping every form of communications medium, and faxing is no exception. The latest twist: Internet faxing services that let you send messages to any fax machine from any Web browser or email, and others that give you a "personal fax phone number," then forward any documents sent there to your e-mail inbox. Microsoft CRM Customization Microsoft CRM customization techniques are very diversified and based on the whole spectrum of recent Microsoft technologies. The main terms you should know are: Microsoft CRM SDK 1. Helping Newbies Understand Professional Software The Windows registry is a huge database that ensures normal computer operation. Installing and uninstalling software can make your registry a mess, leading to decreased PC performance and causing computer crashes. Corporate Accounting System: Microsoft Great Plains - Overview Corporate ERP/MRP selection might be tough one, especially considering very turbulent ERP world and fierce competition between Microsoft Business Solutions (Great Plains, Navision, Axapta, MS CRM), Oracle (Oracle Financials, PeopleSoft, JD Edwards), IBM (including Lotus Domino), SAP, Microsiga (Brazil, Portugal). We recommend you, IT director of large corporation, make your home work and decide on Microsoft or Java/EJB/J2EE platform (however you should consider vendor dependence minimization, and stake on both with XML streams integration between the two). MultiNational Corporation ERP Implementation - Microsoft Business Solutions Great Plains If you look back to the history, you will see that ERP for large publicly traded company had to be built upon very reliable hardware (more likely non-Intel hardware: mainframe, Sun sparc, etc.), powerful database platform: Oracle, DB2, Ingress, Sybase and reliable OS: UNIX. Protect Your Most Vital Business Asset with Security Software Homeland security, airport security, Internet security â?" these days weâ??re literally inundated with a need to protect ourselves and our property from the non-stop bombardment of potentially damaging attacks by unknown sources and entities lurking somewhere out there.This is the reality of the world in which we live today. Microsoft CRM or Siebel Siebel is traditional CRM market leader, however and mostly due to recession 200-2003, Siebel lost sizable portion of CRM market to new tiger, such as Microsoft CRM. Microsoft CRM s recent (2001) CRM answer from Microsoft and attempt top get market share from traditional vendors: Siebel, Oracle, Onyx. String in Java Handling character strings in Java is supported through two final classes: String and StringBuffer. The String class implements immutable character strings, which are read-only once the string has been created and initialized, whereas the StringBuffer class implements dynamic character strings. Microsoft Great Plains Accounting/ERP Implementation - Finance Industry Customization Example Microsoft Business Solutions Great Plains is very generic accounting application out of the box and has multiple modules to address specific horizontal or vertical market requirements. At the same time Great Plains, now being moved on MS SQL Server platform allows you to deploy standard tools to customize and fit to these requirements, when you don't need rich custom functionality, just few touches. |
home | site map |
© 2006 |