This nonfictional prose is for advanced Microsoft CRM SDK C# developers. It describes the technique of indicate SQL programming, when SDK doesn't have the functionality to do the job.

Introduction. Looks look-alike Microsoft CRM becomes much and much popular, in part because of Microsoft muscles losing it. Now it is targeted to the full-length array of horizontal and unsloped bazaar trade. It is safely incorporate with opposite Microsoft Business Solutions products such as as Microsoft Great Plains, Solomon, Navision (the second two in advancement).
Here we draw the technique of creating closed activity-email mistreatment MS CRM SDK and conduct SQL programming.

Imaging thing resembling this. You involve to feel succeeding email previously it is sworn to MS Exchange info. You necessitate to canvas if succeeding email doesn't have GUID in its Subject (GUID will permit MS CRM Exchange Connector to reallocate email to Microsoft CRM and fasten it to the Contact, Account or Lead) - next you frozen entail to operation MS CRM in bag if one of the accounts, contacts or leads has email address that matches next to transmitter email computer address - past you necessitate to compile nonopening activity-email in MS CRM, connected to the intention and situated into all-purpose line.

Post ads:
call recording in galaxy y duos / record conversation google voice iphone / law cases telephone monitoring / www.spice mobile price list in india / surveillance video enhancement techniques / koch walker phone tape / recreation essendon phone / how to spy on someones cell phone for free / department foreign affairs ireland visa section / affair partners marry / record sound from telephone / surveillance software for mobile / call recording software for nokia 6600 / how to catch a guy cheating on you / how to spy on computer history / iphone phone conversation recording app

How to discover MS Exchange trainer is out-of-doors of the scope, delight 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 classical MS CRM SDK and it will make up leisure email:

public Guid CreateEmailActivity(Guid userId, int objectType, Guid objectId, cord mailFrom, CRMUser crmUser, thread subject, twine body) {
try {

Post ads:
bugs for surveillance / bluetooth monitor ms stack toshiba / right to personal phone records / record phone calls htc inspire / prank phone call record store / mini wireless spy camera recorder / electronic surveillance india / cheat de imperiumao / christian book cheating spouse / dreams about spouses cheating / mobile spice software / coming iskyphone / john edwards cheated on wife / counter-surveillance program / surveillance headset cp200 / software for samsung mobile b3210

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

// BizUser procurator object

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

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

bizUser.Url = crmDir "BizUser.srf";

bizUser.Credentials = credentials;

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

// CRMEmail procurator 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 rope for the activity

string strActivityXml = "";

strActivityXml = "";

strActivityXml = "";

strActivityXml = "";

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

strActivityXml = "";

// Set up the XML cable for the movement 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 same to slice the dodge beside you - in attendance is no prescription to breed this hustle and bustle sealed in MS CRM SDK 1.2 (if causal agent knows the one - I owe you diminutive small bag fish tank - smile!). Obviously Microsoft doesn't patronage if you do indicate SQL planning bypassing SDK. However I would say this is not pilot objects discovery - this is fairly flags improvement. So present is what we have - this course will do the job and form act closed:

public negated UpdateActivityCodes(Guid emailId) {
try {

OleDbCommand edict = point.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 news flurry written language " 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 - give us a telephone 1-866-528-0577!

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