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: 3 High-Growth Software Stocks to Gift for Christmas Yahoo Finance This Software Stock With 88% Expected Profit Growth Offers Entry Investor's Business Daily CPPIB bets on U.K.-based Octopus Energy, Kraken software to drive customers’ embrace of renewable energy The Globe and Mail Enterprise Software Stocks Atlassian, Asana, and Docusign Are All Suddenly Soaring. Which Is the Best Buy for 2025? The Motley Fool Delivering efficiencies through automated software testing Federal News Network SAGT IPO News - Malaysian point of sale software provider Sagtec Global files for a $9 million US IPO Renaissance Capital Valsoft Corporation Secures $150M to Further Accelerate Growth in Vertical Market Software Sector AccessWire Tupelo Code Enforcement gets software upgrades Northeast Mississippi Daily Journal NAVAIR Issues RFI for PMA-281 Hardware & Software ExecutiveBiz Why Trump DOGE Initiative Is A Wild Card For Palantir Stock, Software Makers Investor's Business Daily The code whisperer: How Anthropic’s Claude is changing the game for software developers VentureBeat Software security in 2025 - Four encouraging trends App Developer Magazine Moho Animation Software Releases Moho 14.3 Mantis Shrimp Animation World Network Why this self-made software engineer left Silicon Valley to focus on investing in women Technical.ly Cybersecurity Stocks To Watch Heading Into 2025 Investor's Business Daily PlayStation's 2024 in review: Software and hardware underwhelm, but Sony’s never been stronger TechRadar Exploring AI in Software Development Trends AppleMagazine Stream Deck Plus Reverse Engineered Hackaday 11 Best Enterprise Software Stocks to Invest In Insider Monkey 2024.45.32 Official Tesla Release Notes - Software Updates Not a Tesla App Software Is the Next Big AI Opportunity: 1 AI Stock Highly Recommended by Wall Street to Buy Now Yahoo Finance Turkish defense contractor wins top software exporter award for NATO intelligence project TurkishMinute Oracle Financial Services Software Limited (NSE:OFSS) On An Uptrend: Could Fundamentals Be Driving The Stock? Simply Wall St A Look Back at Automation Software Stocks’ Q3 Earnings: UiPath (NYSE:PATH) Vs The Rest Of The Pack Yahoo Finance Symplr plans major technology rollout but cools M&A talk for now The Business Journals Software Is the Next Big AI Opportunity: 1 Brilliant AI Stock to Buy Ahead of 2025, According to Wall Street The Motley Fool EyeVision Develops Inspection Tool for Fastener Threads Vision Systems Design Sewing the digital thread for more sustainable AM VoxelMatters City: New meeting agenda software eases visually disabled's access to records - Santa Fe New Mexican City: New meeting agenda software eases visually disabled's access to records Santa Fe New Mexican Austin Software Dev Earned Her First Million with Chainlink & Solana – Now Eyes BlockDAG for More Gains Analytics Insight Is Paycom Software, Inc.'s (NYSE:PAYC) Latest Stock Performance A Reflection Of Its Financial Health? Simply Wall St The Age of Quantum Software Has Already Started The Wall Street Journal Q3 Earnings Highs And Lows: Salesforce (NYSE:CRM) Vs The Rest Of The Sales Software Stocks Yahoo Finance Valsoft Corporation Secures $150M to Further Accelerate Growth in Vertical Market Software Sector Galveston County Daily News Microsoft Stock Gets a Fresh Price Target Amid Software Review Wall Street Pit Saratoga Springs Police Department implementing new Axon Fusus software The Daily Gazette |
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 |