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: 30 Largest Software Companies in the World by Market Cap Yahoo Finance Guesty, Short-Term Rental Software Provider, Acquires Rentals United Skift Travel News CISA urges software devs to weed out path traversal vulnerabilities BleepingComputer Rocket Software Buys OpenText's App Modernization & Connectivity Business for $2.3B; Milan Shetti Quoted GovCon Wire City to roll out new financial payment software system Hastings Star Gazette Asure Software Inc (ASUR) Q1 2024 Earnings Analysis: Mixed Results Amidst Revenue Growth and ... Yahoo Finance Upland Software (UPLD) Tops Q1 EPS by 2c ; Offers Guidance StreetInsider.com GDDY: Top Software Stock May Watchlists StockNews.com IBM Expands Software Availability in AWS Marketplace Channel Futures Best Fax Server Software 2024 | IBTimes International Business Times Autire's Revolutionary EBP Audit Software Demonstrates Significant Time Savings for CPA Firms PR Newswire Epicor Acquires Smart Software for AI-Powered Inventory Planning - Supply and Demand Chain Executive Epicor Acquires Smart Software for AI-Powered Inventory Planning Supply and Demand Chain Executive Durst Announces 1,000th Installation Of Durst Workflow Software | Label and Narrow Web Label & Narrow Web Exclusive: IBM brings its AI, data and automation software to AWS Marketplace in 92 countries VentureBeat Using my speech issues to improve voice recognition software ALS News Today Best video conferencing software of 2024 TechRadar Tesla Cybertruck gains Off-Road modes, locker-enabling software Motor Authority How Software Composition Analysis (SCA) Addresses President Biden’s Executive Order (EO) 14028 Security Boulevard GlobalLogic Recognized as Leader in Everest Group's Software Product Engineering Services Business Wire Auto Dealership CRM Software: Global Market Analysis and Forecast (2018-2033) by Type, Functionality, Application ... Yahoo Finance Marin Software Announces First Quarter 2024 Financial Results Daily Host News Verizon 2024 DBIR: Software supply chain risks fuel a data breach epidemic Security Boulevard The power of the power pose: How a software CEO became a better leader Business Observer Investors in Take-Two Interactive Software (NASDAQ:TTWO) have seen decent returns of 40% over the past five years Yahoo Finance Update from eSync Alliance accelerates software-defined vehicle roadmap ComputerWeekly.com Ford’s BlueCruise software probed after fatal crashes just-auto.com DeepSea Developments Modularizes the RTL-SDR for Multi-Receiver Software-Defined Radio Projects Hackster.io How patient engagement software can enhance oncology care Health Data Management Paycom Software (PAYC) Q1 2024 Earnings Call Transcript The Motley Fool CyberArk Shares Slide Despite Positive Outlook, Earnings Report - CyberArk Software (NASDAQ:CYBR) Benzinga Supply Chain Management Software: Build the foundation, deliver the value Logistics Management Software Developer SolarWinds Stock Shines After Q1 Earnings - Here's Why - SolarWinds (NYSE:SWI) Benzinga 2024.14.3 Official Tesla Release Notes - Software Updates Not a Tesla App Wyoming Senator Slams DOJ's Take on Non-Custodial Crypto Software, Vows to Protect User Rights – Bitcoin News Bitcoin.com News V-22 Evolving into 'Software-Defined' Platform National Defense Magazine Top ideas in vertical software with valuations over or below 50th percentile - Baird - Seeking Alpha IBM Expands Software Availability to 92 Countries in AWS Marketplace The Globe and Mail NVIDIA Buys Software Provider Run:AI Silicon Valley Daily Paycom Software Inc (PAYC) Q1 2024 Earnings Call Transcript Highlights: Robust Growth and Strategic Expansions GuruFocus.com Carnival Corporation completes fleetwide software rollout Port Technology International Software support chap survived breaking his customer The Register |
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 |