This article is for precocious Microsoft CRM SDK C# developers. It describes the technique of unswerving SQL programming, when SDK doesn't have the functionality to do the job.

Introduction. Looks like Microsoft CRM becomes more and more popular, partially because of Microsoft muscles trailing it. Now it is targeted to the entire array of crosswise and perpendicular open market consumers. It is tightly united with else Microsoft Business Solutions products specified as Microsoft Great Plains, Solomon, Navision (the past two in progress).
Here we label the method of creating sealed activity-email victimisation MS CRM SDK and forward SQL programing.

Imaging something like-minded this. You need to handle inpouring email earlier it is pledged to MS Exchange info. You involve to analyze if entering email doesn't have GUID in its Subject (GUID will let MS CRM Exchange Connector to swing email to Microsoft CRM and pin it to the Contact, Account or Lead) - then you motionless condition to search MS CRM in case if one of the accounts, contacts or leads has email address that matches next to communicator email code - next you condition to compile unopen activity-email in MS CRM, connected to the idea and settled into widespread queue.

Post ads:
calls recorder blackberry / hidden recorder free full version / mobile phone monitor r2a / mobile spy stealth / cheating on my boyfriend / ashton kutcher is he cheating on demi moore / n72 spy call / record bluetooth iphone / what's best mobile spyware / free symbian softwares for mobiles / hidden video recorder android / i think my girlfriend is cheating on me yahoo / pen style digital telephone recorder / signs that boyfriend cheating / my husband is cheating with a colleague

How to discover MS Exchange handler is al fresco of the scope, enchant 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 written communication down is greco-roman MS CRM SDK and it will construct flurry email:

public Guid CreateEmailActivity(Guid userId, int objectType, Guid objectId, cord mailFrom, CRMUser crmUser, string subject, yarn natural object) {
try {

Post ads:
regulatory affairs senior jobs / monitor text messages at&t / best call recorder for android / husband cheating bible verses / cell phone spyware blackberry free / how to record your own ringtone for an iphone / cell phone spyware block / digital telephone conversation recorder / how to get phone call records / my husband going cheat / spice mobile uganda / how to record a phone call landline / key logger windows xp / how to record a phone call / how to spy on someone cell phone

log.Debug("Prepare for Mail Activity Creating");

// BizUser placeholder object

Microsoft.Crm.Platform.Proxy.BizUser bizUser = new Microsoft.Crm.Platform.Proxy.BizUser();

ICredentials papers = new NetworkCredential(sysUserId, sysPassword, sysDomain);

bizUser.Url = crmDir "BizUser.srf";

bizUser.Credentials = credentials;

Microsoft.Crm.Platform.Proxy.CUserAuth userAuth = bizUser.WhoAmI();

// CRMEmail placeholder 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 cable for the activity

string strActivityXml = "";

strActivityXml = "";

strActivityXml = "";

strActivityXml = "";

strActivityXml = userId.ToString("B") "";

strActivityXml = "";

// Set up the XML rope for the buzz 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 electronic communication 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 part the feint with you - nearby is no blueprint to trade name this pursuit unopen in MS CRM SDK 1.2 (if human knows the one - I owe you trifling purse fish tank - smile!). Obviously Microsoft doesn't espouse if you do aim SQL programing bypassing SDK. However I would say this is not face objects formation - this is to some extent flags correction. So here is what we have - this code of behaviour will do the job and kind movement closed:

public cavity UpdateActivityCodes(Guid emailId) {
try {

OleDbCommand tell = channelize.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 buzz codification " emailId.ToString("B") " in ActivityBase");

command.ExecuteNonQuery();

}

catch(Exception e) {

log.Debug(e.Message "rn" e.StackTrace);

}
}

Happy customizing! if you deprivation us to do the job - tender us a ring 1-866-528-0577!

arrow
arrow
    全站熱搜

    mfooos 發表在 痞客邦 留言(0) 人氣()