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: Software vendors dump open source, go for the cash grab Computerworld Software Stocks Give IBD 50 Something To Chew On As Charts Start To Look Better Investor's Business Daily AI hallucinates software packages and devs download them – even if potentially poisoned with malware The Register These 2 DevOps Stocks Are Must-Owns for Software Investors, Says Wall Street Analyst - Yahoo Finance Elon Musk Pushes to Increase Use of 'Full Self-Driving' Software as Tesla Sales Cool The Wall Street Journal GM loses another software leader amid more reorganization Detroit Free Press NAB 2024: RT Software Announces New Partnership with Videodata Sports Video Group 7 No-Brainer Software Stocks to Own Now InvestorPlace Take-Two Interactive Software, Inc. to Acquire The Gearbox Entertainment Company Inc., Developer of Highly ... Business Wire Can Genesis Succeed Where Lexus and Infiniti Struggled? EVs and Software Could Be the Ticket MotorTrend Unpleasant Surprises Could Be In Store For Paycom Software, Inc.'s (NYSE:PAYC) Shares Simply Wall St Productivity Boost: Real Uses of AI in the Software You Already Have Legal Talk Network NAB 2024: Evertz Highlights New Features for Its Software-Defined Video-Networking Solution Sports Video Group Global Legal Practice Management Software Market Projected to Reach $4.74 Billion by 2028 Yahoo Finance Rebellion Defense Secures GSA Contract to Provide Software Services to Government Clients ExecutiveBiz Marc Havercroft Appointed Senior Vice President of International Sales at WorkForce Software Yahoo Finance RLDatix Finalizes Acquisition of Breitenbach Software Healthcare IT Today Battery Ventures Announces Strategic Investment in AdaCore to Propel the Future of High Integrity Software ... Yahoo Finance We Need to Decarbonize Software IEEE Spectrum AI Facilitates Rapid Development of Diabetes Prevention Software, Study Finds The Healthcare Technology Report. SPH Engineering presents Drone Show Software 4.3, elevating Drone Shows to new heights DirectionsMag.com Beacon obtains FDA clearance for SleepStageML software Medical Device Network Porsche partners with Applied Intuition to develop and deploy vehicle software Automotive Testing Technology International Marelli has developed a Light Domain Controller to enable software-defined vehicle architectures StreetInsider.com EVs, software spur higher automotive sales for microchip makers Automotive News NXP Breaks Through Integration Barriers for Software-Defined Vehicle Development with Open S32 CoreRide Platform GlobeNewswire NXP Launches Open S32 CoreRide Platform for Software-Defined Vehicles - News All About Circuits GE HealthCare launches PVA urology-based AI software feature Medical Device Network Progress Software Confirms Bid to Acquire MariaDB The Wall Street Journal NAB Show: Pebble Launches PRIMA Software Platform TV Technology The Government's Struggles With Outsourcing Software Development The New York Times Do Analysts Expect Paycom Software Inc (PAYC) Stock to Rise After It Has Gained 8.87% in a Month? InvestorsObserver Insta360 Studio: free software gets significant update by Jose Antunes - ProVideo Coalition ProVideo Coalition New software boosts accuracy of tech to measure crop health hortidaily.com Premarket Mover: TAKE-TWO INTERACTIVE SOFTWARE, INC Common Stock (TTWO) Down 1.32% InvestorsObserver Loan Servicing Software Market size to grow by USD 2.13 billion from 2022 to 2027, Technavio PR Newswire Local startup launches AI productivity software aimed at blue-collar service companies RichmondBizSense Garmin announces first software update for new smartwatch with fresh features and bug fixes Notebookcheck.net Abrigo acquires TPG Software Retail Banker International Should Software - Application Stock WM Technology Inc (MAPS) Be in Your Portfolio Thursday? InvestorsObserver Asus ROG Azoth Review: Excellent Keyboard, Awful Software MUO - MakeUseOf Cisco addressed high-severity flaws in IOS and IOS XE software Security Affairs Case Study: Sintavia Extends Vertical Integration Strategy to Software Digital Engineering 24/7 Porsche and Applied Intuition announce joint developments Porsche Newsroom Intel, Microsoft Slip as China Blocks Foreign Chips, Software in Government Computers - Investopedia 2024.8.7 Official Tesla Release Notes - Software Updates Not a Tesla App |
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 |