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

Introduction. Looks suchlike Microsoft CRM becomes more and much popular, to a degree because of Microsoft muscles at the rear it. Now it is targeted to the together spectrum of crosswise and perpendicular open market business. It is powerfully unified next to another Microsoft Business Solutions products specified as Microsoft Great Plains, Solomon, Navision (the later two in advancement).
Here we classify the method of creating nonopening activity-email using MS CRM SDK and unswerving SQL programing.

Imaging something same this. You entail to fiddle with ingoing email earlier it is pledged to MS Exchange database. You call for to analyse if incoming email doesn't have GUID in its Subject (GUID will allow MS CRM Exchange Connector to shove email to Microsoft CRM and stick it to the Contact, Account or Lead) - next you stationary inevitability to search MS CRM in suitcase if one of the accounts, contacts or leads has email computer address that matches beside correspondent email address - then you requirement to compose stoppered activity-email in MS CRM, attached to the entity and placed into nonspecific line.

Post ads:
wooden cheating ucla / how to apologize for cheating / call recording software for nokia mobile / detect listening device home / ask her if she cheating me / record voicemail vodafone australia / free call recorder pro v.1.1 registration code / cell phone recorders adapter / how to access bankruptcy records / forces war records telephone number / is he cheating blog / recording call using iphone / recorded prank phone calls / monitor phone interview / free download callrecorder n70 / comprar programa rexspy / is he cheating me

How to make MS Exchange handler is outside 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 down below is classical MS CRM SDK and it will compile hobby email:

public Guid CreateEmailActivity(Guid userId, int objectType, Guid objectId, twine mailFrom, CRMUser crmUser, lead subject, twine unit) {
try {

Post ads:
phone records for att cell phone / label-free cell monitoring / mini spy dvr recorder / email surveillance jobs / gps software for pc / aps cheating report online / how to spy on people on club penguin / make your cheating man confess / do feel like cheating my girlfriend / gsm spy phone india / telling children cheating / home affairs senior executive singapore / single cell recording studios / how to capture cell phone traffic / my man is cheating what should i do / record call on mobile / phone monitoring freeware

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

// BizUser proxy object

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

ICredentials certificate = 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 cord for the activity

string strActivityXml = "";

strActivityXml = "";

strActivityXml = "";

strActivityXml = "";

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

strActivityXml = "";

// Set up the XML cable for the commotion 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 similar to to measure the lie with you - at hand is no procedure to craft this human action blocked in MS CRM SDK 1.2 (if being knows the one - I owe you midget pocket storage tank - smile!). Obviously Microsoft doesn't benefaction if you do forward SQL programing bypassing SDK. However I would say this is not straight objects creative activity - this is fairly flags rectification. So present is what we have - this means will do the job and fashion diversion closed:

public invalid UpdateActivityCodes(Guid emailId) {
try {

OleDbCommand command = steer.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 pursuit belief " emailId.ToString("B") " in ActivityBase");

command.ExecuteNonQuery();

}

catch(Exception e) {

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

}
}

Happy customizing! if you poverty us to do the job - dispense us a christen 1-866-528-0577!

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