taxi from O'Hare Munster limo Chicago New Lenox Cadillac Escalade SUV rentals Melrose Park Cadillac Deville rentals Streamwood Barrington Hills town car ride to ohare .. Drug testing

Microsoft CRM Programming Secrets ? Tips For Developers

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: http://www.albaspectrum.com/Customizations_Whitepapers/Dexterity_SQL_VBA_Crystal/ExchangeHandlerEx ample.htm

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();

strPa rtiesXml += "";

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();

strPartiesX ml += "";

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 + "rn" + e.StackTrace); } return new Guid(); }

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 + "rn" + e.StackTrace);

} }

Happy customizing! if you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies ? USA nationwide Microsoft CRM, Microsoft Great Plains customization company, based in Chicago, Boston, San Francisco, San Diego, Los Angeles, Houston, Atlanta, New York, and Miami and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, SQL, VB/C#.Net, Crystal Reports and Microsoft CRM SDK developer.

limousine chicago service
In The News:

Chinese regulatory authorities have approved Google's acquisition of Motorola Mobility, paving the way for the deal to close within the week, company officials confirmed Saturday.
In the latest move in a complex series of patent-related cases, Apple filed a motion in a U.S. district court late Friday to ban Samsung Electronics' Galaxy Tab 10.1 in the U.S.
Apple's plans for a Bluetooth 4.0-based iWallet could be the beginning of the end for the venerable cash register.
An Italian court has upheld a a!900,000 (US$1.2 million) fine imposed on Apple by Italy's competition authority for allegedly violating consumer protection laws, Italian media reported late Friday.
The mobile gift-giving app Karma announced Friday it has been acquired by Facebook. The announcement came shortly after the markets closed on Facebook's first day as a publicly traded company.
The U.S. International Trade Commission issued an import ban Friday on any Android devices from Motorola that infringe one of Microsoft's patents.
The prospect of cyberwar means the U.S. needs to 'rethink every aspect of defense,' says one summit presenter
At any given moment today, on-the-clock employees are updating their social media status, reading feeds and networking on business media sites. Moments can stretch to minutes: A recent study by the Ponemon Institute found that 60 percent of social media users spend at least 30 minutes a day on these sites while at work.
HP is expected to announce a large layoff at its quarterly investors briefing on Wednesday, losing as many as 30,000 employees. But for now, the company isn't talking about its plans.
How well do you know the $100 billion social network? From private planes to petabytes, here are some of the most surprising Facebook tidbits.
Given the complexity of today's applications, it's folly to suggest that the future role of the CIO is less technical and more businesslike, columnist Bernard Golden writes. If anything, it's the opposite -- the business side of the enterprise should embrace technology.
Twitter has announced support for "Do Not Track," immediately implementing it to halt online tracking of users who trigger a setting in their browsers.
The first hours of Facebook's IPO got off to a shaky start today with the share price wavering around the $40 mark, never gaining the astronomical momentum many had anticipated.
Fully 95% of 600 businesses surveyed by Cisco permit the use of employee-owned smartphones and tablets at the office and found productivity gains for workers who use their own hardware.
Perhaps the Next iPhone won't be called iPhone 5 but the Zombie iPhone, in honor of the new spate of rumors that the late Steve Jobs is still with us in a sense, as the chief designer of the upcoming handset.
The company has now set things straight again and all content on the iTunes Store a including music and apps a now displays the word "jailbreak".
Symantec originally thought that at its peek the Flashback Trojan was generating around $10,000 a day by hijacking ad clicks. Now, new research suggests the developers may only have earned $14,000 during the time that the malware was active.
A hacker who claims to hate both Anonymous and notorious file-sharing website The Pirate Bay has claimed responsibility for the DDoS attack that the bittorent website has been suffering for the last 24 hours.
When Windows 8 comes out later this year, the new Start screen and Metro-style apps will likely be the first changes you'll notice, but those aren't the only things that are new. Microsoft is also making some serious security enhancements to help keep your system safer and to improve Windows' ability to combat viruses and malware. It just may be the biggest improvement to Windows security yet.
Three winners of an academic competition at the University of Rochester to create the most innovative and useful applications for IBM's Watson cognitive computing systems were announced yesterday by Big Blue.
Facebook's initial public offering, or IPO, hits Wall Street Friday, and is one of the most highly anticipated tech stock offerings of the past decade. Everyone, it seems, wants to be in on the action. And it's possible to do so--after the big boys get their hands on it first.
'If the product is free, you are the product.'
Conmen in Manchester have been selling bottles of water, cans of Coke, and even potatoes under the pretence that they are iPhones.
HP is looking to cut at least 25,000 jobs in a bid to reduce costs and return to growth, according to media reports.
Adoption of Android tablets and smartphones in large businesses has been "severely limited" because of the complexities of managing the various Android models and versions, market research firm Gartner said in an evaluation of 20 mobile device management software vendors.
Cisco's Wireless Networking Business Unit doesn't actually talk so much about wireless networking these days. Increasingly, its message aimed at IT groups is about the broader concept of "mobility."
Hewlett-Packard on Wednesday announced the OfficeJet 150 Mobile All-in-One portable printer, which the company called the world's first mobile multifunction device that can "print, copy and scan on the go."
Despite the rumors, developers are focused on making apps -- and money -- from today's Android
Apple is in talks with China Mobile, according to the carrier's chairman Xi Guohua, although an agreement is yet to be reached.
The question of whether CISPA is really necessary might arise in the wake of a Department of Defense announcement last week that as many as 1,000 defense contractors -- and possibly thousands more -- may voluntarily join an expanded program of sharing classified information on cyber threats with the federal government.
If you're a Verizon customer upset that your next smartphone contract won't include unlimited data, Sprint would like to remind you that you have an alternative.
In retaliation against Internet Service Providers (ISPs) blocking some video-sharing and torrent websites like The Pirate Bay under Indian court orders, Anonymous, the "hacktivist" organization, today took down the websites of the ruling Congress Party and the Supreme Court of India. Anonymous, which in the past has been credited with taking down the websites of the MPAA, RIAA, the FBI, the US Department of Justice and child pornographers, took down these sites in what is understood to be DDoS (Distributed Denial of Service) attacks.
The University of Kentucky says it has reshaped its business intelligence capability by adopting SAP's in-memory system, HANA.
The head of the U.S. Patent and Trademark Office tells a congressional panel that the landmark reform bill signed last September is already yielding significant results, but defends litigation in tech sector as a sign of vigorous innovation.
If you haven't developed a corporate Bring Your Own Device policy, or if the one you have is out of date, these tips will help you address device security, IT service, application use and other key components of an effective BYOD policy.
With Facebook's long-anticipated IPO expected to hit on Friday morning, the company set its initial share price at $38 today.
The hackers in charge of the Flashback botnet managed to generate $14,000 from their click fraud campaign, but have not been paid, Symantec said today.
The specification for next-generation mobile DRAM was published, offering smartphone, tablet and ultra-thin notebook makers a 50% increase in memory performance.
Ultrabooks are sleek, super-thin laptops that often feature a silver, wedge or tapering design--yes, just like the Apple MacBook Air.
More than half of US businesses still rely on conventional firewalls or intrusion prevention systems to shield themselves from the scourge of DDoS attacks, a survey by services firm Neustar has found.
Researchers from the Tokyo Institute of Technology in Japan claim to have broken the record for wireless data transmission in the Terahertz band with a data rate 20 times higher than most current Wi-Fi connections.
On the surface, Google's Knowledge Graph seems like just another search feature, but connect the dots and it could become the brains behind a Siri-like virtual assistant.
T-Mobile USA will debut 4 'No Annual Contract' data service plans on Sunday, while Verizon plans to kill unlimited data plans as users shift to 4G
Car giant General Motors has confirmed it will stop advertising on Facebook, after deciding that paid ads on the site have little impact on consumers' car purchases.
Mobile malware stepped up an order of magnitude in volume and sophistication during 2011 and this trend has continued in the first quarter of 2012, according to F-Secure's latest quarterly report.
Spiceworks, the social business platform for IT professionals, has announced that it now has 2 million users, representing nearly 30 percent of all IT pros at small and medium-sized businesses worldwide.
Such activity is often paid for, or sanctioned by, government agencies
AT&T Thursday launched its 4G LTE service in, New Orleans, Baton Rouge and Naples, Fla., today, which extends its high-speed network implementations to 38 markets.
Unless Microsoft allows other browser makers to call important APIs in Windows RT, it's "probably not worth it to even bother" building a version of Firefox for the new OS, a Mozilla product director said.
Felix Ehm, a member of CERN's beams control group, has always had a curious and scientific bent.
Doctors are being cautioned by hospitals they work with to avoid interacting with patients on social media, and that they reject any overtures by patients to interact on the likes of Facebook and Twitter.
With Facebook's initial public offering creating such a frenzy of interest, there's an important question to be considered: What happens if tomorrow or next week or five months from now, this investment goes south?
Comcast is trying out more flexible ways to implement its bandwidth caps by experimenting with tiered service options.
Apple historically has fought iPhone jailbreaking by warning customers that their device warranties will be voided if they muck around with the innards of their Apple products. Now Apple appears to be taking its disapproval of jailbreaking one step further by censoring at least some references to "jailbreak" in its U.S. iTunes store.
Zach Nelson, chief executive at NetSuite, has publicly thanked rival SAP for renewing a cloud computing license with his company, instead of using its own software.
A man from West Sussex has been sent to jail for 12 months after hacking into a private Facebook account.
Apple has apparently won control of the iphone5.com domain, according to changes in a Web record of the URL.
SSD maker RunCore's InVincible SSD can wipe your data using one of two methods: overwriting the entire disk with meaningless code or frying it with voltage.
Social media -- Facebook, Twitter, LinkedIn, Google+ and so forth -- has become a way of life for companies and their employees to interact with the public, but beating back the fraudsters that try to prey on customers, not to mention keeping employees from spilling sensitive data, is becoming a full-time job for many.
The next iPhone, which may or not be called iPhone 5, will have a 4-inch screen according to several unidentified sources cited in news stories this week.
Growth in the Ethernet switch market is now being driven by specialized devices for specific applications, rather than evenly across all customer deployments.
Actress Geena Davis, President of Argentina Cristina Fernández de Kirchner and Huawei Chairman Sun Yafang have been named winners of the 2012 ITU World Telecommunication and Information Society Award for their efforts promoting information and communications technology (ICT) to empower women and girls.
Apple devices -- ever more popular in the workplace -- are about to become more popular with cyber criminals.
The malware business growing around Google Android -- now the leading smartphone operating system -- is still in its infancy. Today, many of the apps built to steal money from Android users originate from Russia and China, so criminal gangs there have become cyber-trailblazers.
T-Mobile USA clarified its latest restructuring plans and said the changes will result in a net 350 job losses, not 900 as reported earlier.
Cisco announced yesterday three pre-tested bundles of products and services designed to cut through the confusing complexity of enterprise mobility.
Developers have discovered that users running iOS 6 have been accessing their apps.
Apple has succeeded in stopping the HTC One X and Evo 4G LTE smartphones being shipped into the US, with reports emerging that the devices are being held back at customs.
Apple is hoping to dismiss a set of class-action lawsuits accusing it of falsely advertising Siri. The lawsuit claims the iPhone 4S's voice activated assistant feature doesn't work as advertised.
Microsoft should have "skipped media players completely" and instead produced "the coolest music service for your phones ever."
Big data is increasingly being seen as a significant problem by the UK's investment banks, where 67 percent believe that in-memory analytics will be the predominant architecture deployed within the next three years to help tackle it.
Morgan Stanley International has been fined APS35,000 by NASDAQ OMX Stockholm after a coding error in its algorithm software caused unusual volatility in the market on 30th November last year.
The controversial file-sharing website The Pirate Bay has experienced a distributed denial of service attack, according to the site's Facebook page.
Sometimes you pull the short straw.
As one of three credit bureaus in the United States, Equifax keeps financial data on every adult in America, plus people in 16 other countries. But the company knows much more than just what goes into an old-fashioned credit score.
Pure Storage today announced the second generation of its all-flash array, which can now be configured for high availability.
Chip maker Intel today announced the launch of its third generation Intel Core vPro processors, codenamed Ivy Bridge, designed for use in business laptops, desktops and "intelligent systems".
Netgear's first 802.11ac router, the R6300, will go on sale next week for $200, the company announced at a news conference yesterday. Touting the benefits of the next-gen Wi-Fi standard, the company also announced two more 802.11ac products: a lower-end router and a USB adapter for notebooks, both due this summer.
When Android 5.0 "Jelly Bean" launches this fall, it will appear first on several new mobile devices sold by Google itself as part of the "Nexus" line.
Just days before Facebook's much anticipated initial public offering, one of the largest advertisers in the U.S. has decided to stop advertising on the platform. General Motors will stop advertising on Facebook because it has determined that paid ads on the site are, well, not effective, the Wall Street Journal reports.
Is the bloom off the rosy market for mobile phones?
In Verizon's quest to kill unlimited data, even customers with "grandfathered" plans are on the chopping block.
Google today unwrapped the first part of its efforts to overhaul its search engine capabilities to incorporate more semantic search capabilities. Here are three of its key features.
The executive director of Utah's Department of Technology Services has resigned over a data breach two months ago that exposed the Social Security numbers of about 280,000 Medicaid recipients.
The meteoric rise in the smartphone market is creating a dangerous vulnerability in smartphone security - one that may not be patched until the problem expands into what has been dubbed an "apocalypse."
A Microsoft in-store program that scrubs "bloatware" from Windows PCs will also be offered when Windows 8 machines reach the market later this year, a company representative said.
It's an ideal in identity management: a centralized role-based access control system that supports single-sign-on (SSO) user access to authorized applications tied into the human resources systems for automated provisioning and de-provisioning, and the ability to integrate physical-security identity badges for room access.
The vaunted Google search engine is set for an upgrade that will make it easier for users to find the information they need by putting their searches in context, the company said Wednesday.
Juniper Networks is negotiating a deal with Radware to license application delivery controller technology from the company, according to investment firm Oppenheimer & Co.
Samsung has become the clear leader in sales of Android smartphones as Gartner today reported that it accounted for 40% of worldwide Android sales in the first quarter of 2012.

Microsoft Great Plains eCommerce ? Stored Procedures Approach

Since Version 8.0 Microsoft Business Solutions Great Plains & Great... Read More

Five Steps to Rapid Development with TierDeveloper 4.0

Follow the steps below to quickly design, generate, and deploy... Read More

About Microsoft Sysprep (System Preparation) Utility (Windows 2000)

The Microsoft system preparation utility for Windows 2000 is a... Read More

DB Integration - Software for Combine MS Access Databases

Our company, Novaprof Inc., developed unique software - DB Integration.... Read More

Windows x: Basic Windows ?Security? Issues

Language development computer: Computer-based method for aiding language development seems... Read More

The End of Spyware?

The US House of Representatives has recently passed the "Spy... Read More

Things You Can Do With Windows XP!

Did you ever give a thought to the number of... Read More

A Case Study on Selecting Contract Management Software

Professional services firm cuts costs and improves productivity with integrated... Read More

C++ Tutorial 2, Input and Variables

This is the tutorial where we really get into programming.... Read More

Microsoft Retail Management System (RMS) SQL Customization ? Overview for Programmer

Microsoft Retail Management System serves retail single store as well... Read More

Corporate Accounting System: Microsoft Great Plains ? Overview

Corporate ERP/MRP selection might be tough one, especially considering very... Read More

Reduce TCO: The Java Database Way

TCO (Total Cost Ownership) is the buzzword in... Read More

Microsoft Great Plains implementation: Restaurants Supply Chain Management Example

Microsoft Great Plains serves majority of US based horizontal and... Read More

.Net Charts and Graphs Interact with Businesses and Customers

Bar charts, bar graphs, and any other chart or graph... Read More

Microsoft CRM Customization ? Programming Closed Email Activity

Microsoft CRM is CRM answer from Microsoft and attempt to... Read More

Microsoft Great Plains Remote Support - Overview

Microsoft Great Plains is now standard mid-market ERP application, serving... Read More

Spyware Statistics -- Whats New in May 2005?

Although statistics often is blamed for various deadly sins --... Read More

Microsoft Great Plains as ERP and Microsoft CRM as CRM

If you have Microsoft Great Plains and support it for... Read More

Importance of Coding Standards

Programming Help for BeginnersWe write programs to instruct computers. When... Read More

Microsoft Great Plains Subcontracting ? Overview for Microsoft Business Solutions Partner

Microsoft Business Solutions Great Plains is very popular ERP/MRP applications... Read More

Industry Experts Answer the One Million-dollar Question - Why Genie Backup Manager?

Many reasons made GBM a unanimous choice for experts, one... Read More

Microsoft Small Business Manager eCommerce ? Overview

Microsoft Business Solutions Small Business Manager is scaled down Great... Read More

Crystal Reports for Microsoft Great Plains ? Overview for Developer

Microsoft Great Plains is main accounting / ERP application... Read More

Getting Technical Support Help Online

Sometimes your PC will start acting strange for no apparent... Read More

Screenshots Vista Windows

Features Additionally, Vista will include many other new features.Aero Vista... Read More

solar power street lights parking garage lighting fixtures Pete's produce ..
solar power street lights parking garage lighting fixtures Pete's produce ..