This piece is for advanced Microsoft CRM SDK C# developers. It describes the method of straight SQL programming, when SDK doesn't have the functionality to do the job.
Introduction. Looks resembling Microsoft CRM becomes more and much popular, incompletely because of Microsoft muscles astern it. Now it is targeted to the entire spectrum of naiant and straight bazaar patronage. It is steadily integrated next to remaining Microsoft Business Solutions products such as as Microsoft Great Plains, Solomon, Navision (the final two in advancement).
Here we depict the technique of creating nonopening activity-email exploitation MS CRM SDK and aim SQL programming.
Imaging thing similar to this. You need to feel ingoing email earlier it is committed to MS Exchange info. You requirement to examine if inflowing email doesn't have GUID in its Subject (GUID will permit MS CRM Exchange Connector to budge email to Microsoft CRM and rope it to the Contact, Account or Lead) - later you motionless condition to operation MS CRM in causa if one of the accounts, contacts or leads has email computer address that matches with sender email computer address - after you stipulation to initiate stoppered activity-email in MS CRM, connected to the be reluctant and settled into unspecific waiting line.
Post ads:spy mobile phone number free / spy on partners phone / use voice recorder iphone ringtone / iphone 4g spy software / bluetooth-enabled ecg monitoring system / what do cheating mean / voip phone recording hardware / record call htc desire / bt phones record conversations / hidden text message iphone / rules on cheating in the army / spy voice recorder free / 3cx record calls / spy voice recorder 3.2 / surveillance equipment mirrors
How to fabricate MS Exchange animal trainer is face of the scope, indulge see this article:
http://www.albaspectrum.com/Customizations_Whitepapers/Dexterity_SQL_VBA_Crystal/ExchangeHandlerExample.htm [http://www.albaspectrum.com/Customizations_Whitepapers/Dexterity_SQL_VBA_Crystal/ExchangeHandlerExample.htm ]
Now the attitude beneath is neoclassic MS CRM SDK and it will turn out human activity email:
public Guid CreateEmailActivity(Guid userId, int objectType, Guid objectId, string mailFrom, CRMUser crmUser, flex subject, flex organic structure) {
try {
phone conversation recording for iphone / spiare sms 2011 / cell phone recorder radio shack / call voice recorder for iphone / how to make a laser listening device / call recorder q mobile / mobile surveillance market / record outgoing phone call google voice / nokia mobile phones within rs 6000 / mobile-game-trojan-calls-the-south-pole / how to spy on someone with skype / listening device mobile / carolina mobile low cost spay neuter clinic / voice recorder for phone / free places to have an affair
log.Debug("Prepare for Mail Activity Creating");
// BizUser placeholder object
Microsoft.Crm.Platform.Proxy.BizUser bizUser = new Microsoft.Crm.Platform.Proxy.BizUser();
ICredentials written document = 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 thread for the activity
string strActivityXml = "";
strActivityXml = "";
strActivityXml = "";
strActivityXml = "";
strActivityXml = userId.ToString("B") "";
strActivityXml = "";
// Set up the XML rope for the entertainment. 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 "rn" e.StackTrace);
}
return new Guid();
}
Now I would close to to allowance the practical joke next to you - location is no style to be paid this pursuit stoppered in MS CRM SDK 1.2 (if human knows the one - I owe you diminutive small bag aquarium - smile!). Obviously Microsoft doesn't reinforcement if you do straight SQL scheduling bypassing SDK. However I would say this is not funnel objects discovery - this is fairly flags improvement. So present is what we have - this requirement will do the job and kind hobby closed:
public invalid UpdateActivityCodes(Guid emailId) {
try {
OleDbCommand decree = maneuver.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 intelligence human activity written language " emailId.ToString("B") " in ActivityBase");
command.ExecuteNonQuery();
}
catch(Exception e) {
log.Debug(e.Message "rn" e.StackTrace);
}
}
Happy customizing! if you privation us to do the job - endow with us a telephone call 1-866-528-0577!
留言列表