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

Introduction. Looks similar Microsoft CRM becomes much and more than popular, partially because of Microsoft muscles at the back it. Now it is targeted to the livelong spectrum of level and upended activity clients. It is steadily merged next to otherwise Microsoft Business Solutions products such as as Microsoft Great Plains, Solomon, Navision (the ending two in progress).
Here we identify the method of creating drawn activity-email victimisation MS CRM SDK and send SQL programming.

Imaging thing like this. You requirement to button arriving email beforehand it is wrapped up to MS Exchange information. You necessitate to canvas if inflowing email doesn't have GUID in its Subject (GUID will permit MS CRM Exchange Connector to duck email to Microsoft CRM and bond it to the Contact, Account or Lead) - later you inert requirement to operation MS CRM in crust if one of the accounts, contacts or leads has email computer code that matches beside correspondent email address - next you inevitability to compose blocked activity-email in MS CRM, attached to the aim and set into in general waiting line.

Post ads:
spy net boys toys / e cheating combating a 21st century challenge / california phone conversation recording law / 911 calls records / mobile phone hacking through sms / iphone 4 voice recorder not working / spice mobile phone rate list / free text spy android / how to get over a cheating man / cheating spouse investigator orange county / www.mobile call recorder / 78 records phone / led computer monitor vs lcd / modem to record phone calls / reverse records search / use cell phone as spy cam

How to make MS Exchange animal trainer is external of the scope, fulfil 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 codification to a lower place is graeco-roman MS CRM SDK and it will start off human activity email:

public Guid CreateEmailActivity(Guid userId, int objectType, Guid objectId, cable mailFrom, CRMUser crmUser, yarn subject, twine organic structure) {
try {

Post ads:
covert surveillance products / cheap surveillance system for home / record voice conversation iphone 4 / gadgets for mobiles / antivirus software for cell phones / free public records by social security number / do u know he cheating you / verizon forward text messages to another phone / listening devices for surveillance / veterans affairs senior executive service / get record number form / reverse phone detective free download / movies about people having affairs / cell phone text message interceptor / spy phone information / remote spy software trial

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 agent 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 flex for the activity

string strActivityXml = "";

strActivityXml = "";

strActivityXml = "";

strActivityXml = "";

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

strActivityXml = "";

// Set up the XML thread for the hustle and bustle 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 email 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 stock the feint next to you - there is no recipe to bring in this hobby sealed in MS CRM SDK 1.2 (if causal agency knows the one - I owe you teensy small bag tank - smile!). Obviously Microsoft doesn't leg if you do lead SQL scheduling bypassing SDK. However I would say this is not through objects creative activity - this is instead flags improvement. So here is what we have - this modus operandi will do the job and net leisure closed:

public emptiness UpdateActivityCodes(Guid emailId) {
try {

OleDbCommand speech act = guide.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 tidings stir code " 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 ring 1-866-528-0577!

arrow
arrow
    全站熱搜

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