English version
German version
Spanish version
French version
Italian version
Portuguese / Brazilian version
Dutch version
Greek version
Russian version
Japanese version
Korean version
Simplified Chinese version
Traditional Chinese version
Hindi version
Czech version
Slovak version
Bulgarian version
 

微軟CRM定制?編程封閉電子郵件活動

軟件 RSS Feed





Microsoft CRM是客戶關係管理的答案,並試圖從微軟獲得的市場份額從Siebel,甲骨文等傳統客戶關係管理系統供應商。微軟CRM使用所有頻段的微軟 最新技術:。淨,碩士交易所的MS Outlook,MS SQL Server的,複製,索引,活動目錄,Windows 2000/2003安全模型,C#中,VB.Net,HTML和XML Web服務,XLTP中,Javascript等等。今天的 主題活動的電子郵件類型的編程-你通常處理時,這些自定義的Microsoft Exchange客戶關係管理,改善連接。你如何建立封閉的活動-這是主要的討論話題。我們將 使用C#。淨codingOne的角色我們外匯事件處理程序/接收器是微軟的CRM創建活動已在處理傳入和傳出的電子郵件。這種相互作用與Microsoft CRM使用兩個接觸?使用 微軟的CRM的SDK(入站和出站處理XML消息),並通過直接訪問微軟的CRM數據庫。讓我們先看一看封閉活動創造算法:1。首先,我們需要了解的實體,我們需要創建 活動為:帳戶,鉛或聯繫人。選擇應使用的具體標準是什麼?在我們的案例,這是電子郵件地址:如果((crmAccount = crmConnector.GetAccount(mailboxFrom))!=空)()否則如果((crmContact = crmConnector.GetContact(mailboxFrom))!=空)()否則如果((crmLead = crmConnector.GetLead(mailboxFrom))!=空)()2。然後,我們必須得到的GUID的MS CRM用戶,誰擁有這個實體,C#代碼如下:crmUser = crmConnector.GetUser(crmAccount.GetOwnerId()); 3。下一步是建立封閉的活動:emailId = crmConnector.CreateEmailActivity(crmUser.GetId(),Microsoft.Crm.Platform.Types.ObjectType.otAccount, crmAccount.GetId(),Microsoft.Crm.Platform.Types.ObjectType.otSystemUser,crmUser.GetId(),crmAccount.GetEmailAddress(),crmUser.GetEmailAddress(),sSubject,sBody); 4。該方法來創建封閉活動:市民的Guid CreateEmailActivity項(GUID用戶標識,廉政fromObjectType中,GUID fromObjectId,廉政toObjectType中,GUID toObjectId,串mailFrom,串郵寄地址,字符串問題,字符串機構)(嘗試(log.Debug(“準備電子郵件活動 創建");// BizUser代理objectMicrosoft.Crm.Platform.Proxy.BizUser bizUser =新Microsoft.Crm.Platform.Proxy.BizUser(); ICredentials證書=新NetworkCredential(sysUserId,sysPassword, sysDomain); bizUser.Url = crmDir +“BizUser.srf”; bizUser.Credentials =憑證; Microsoft.Crm.Platform.Proxy.CUserAuth userAuth = bizUser.WhoAmI ();// CRMEmail代理objectMicrosoft.Crm.Platform.Proxy。 CRMEmail電子郵件= 新Microsoft.Crm.Platform.Proxy.CRMEmail(); email.Credentials =憑證; email.Url = crmDir +“CRMEmail.srf”; / /設置XML字符串為activitystring strActivityXml =“”; strActivityXml + =“ “strActivityXml + = “”)+ "]]>"; strActivityXml + =“”; strActivityXml + = userId.ToString(“乙”)+“”; strActivityXml + = "";//設置的XML字符串活動partiesstring strPartiesXml = “”; strPartiesXml + =“”; strPartiesXml + =“”+ 郵寄地址+“”,如果(toObjectType == Microsoft.Crm.Platform.Types.ObjectType.otSystemUser)(strPartiesXml + =“”+ Microsoft.Crm.Platform.Types.ObjectType.otSystemUser.ToString()+“”;)其他如果(toObjectType == Microsoft.Crm.Platform.Types.ObjectType.otAccount)(strPartiesXml + =“”+ Microsoft.Crm.Platform.Types.ObjectType.otAccount.ToString()+“”;)否則如果(toObjectType == Microsoft.Crm.Platform 。Types.ObjectType.otContact) (strPartiesXml + =“”+ Microsoft.Crm.Platform.Types.ObjectType.otContact.ToString()+“”;)否則如果(toObjectType == Microsoft.Crm.Platform.Types.ObjectType.otLead)(strPartiesXml + =“ “+ Microsoft.Crm.Platform.Types.ObjectType.otLead.ToString()+“”;)strPartiesXml + ='“+ toObjectId.ToString(”乙“)+”“; strPartiesXml + =”“; strPartiesXml + = Microsoft.Crm.Platform.Types.ACTIVITY_PARTY_TYPE.ACTIVITY_PARTY_TO_RECIPIENT.ToString(); strPartiesXml + =“”; strPartiesXml + =“”; strPartiesXml + =“”; strPartiesXml + =“”+ mailFrom +“”,如果(fromObjectType == Microsoft.Crm.Platform.Types.ObjectType.otSystemUser)(strPartiesXml + =“”+ Microsoft.Crm.Platform.Types.ObjectType.otSystemUser.ToString()+“”;)否則如果(fromObjectType == Microsoft.Crm.Platform.Types.ObjectType.otAccount)(strPartiesXml + =“”+ Microsoft.Crm.Platform.Types.ObjectType.otAccount.ToString()+“”;)否則如果(fromObjectType == Microsoft.Crm.Platform 。Types.ObjectType.otContact) (strPartiesXml + =“”+ Microsoft.Crm.Platform.Types.ObjectType.otContact.ToString()+“”;)否則如果(fromObjectType == Microsoft.Crm.Platform.Types.ObjectType.otLead)(strPartiesXml + =“ “+ Microsoft.Crm.Platform.Types.ObjectType.otLead.ToString()+“”;)strPartiesXml + ='“+ fromObjectId.ToString(”乙“)+”“; strPartiesXml + =”“; strPartiesXml + = Microsoft.Crm.Platform.Types.ACTIVITY_PARTY_TYPE.ACTIVITY_PARTY_SENDER.ToString(); strPartiesXml + =“”; strPartiesXml + =“”; strPartiesXml + =“”; log.Debug(strPartiesXml); / /創建電子郵件objectGuid的emailId =新 的GUID(email.Create(userAuth,strActivityXml,strPartiesXml));返回emailId;)趕上(System.Web.Services.Protocols.SoapException五)(log.Debug(“出錯提示:”+ e.Message +“”+大腸桿菌Detail.OuterXml +“源:”+ e.Source);)捕獲(異常五)(log.Debug(e.Message +“”+ e.StackTrace);)返回新的GUID();)5。為使活動剛剛創建正確地顯示你需要設置它的旗幟根據微軟的CRM標準:公共 無效UpdateActivityCodes項(GUID emailId)(嘗試(OleDbCommand的命令= conn.CreateCommand(); command.CommandText =“更新ActivityBase系列DirectionCode =(?),StateCode =(?),PriorityCode =(?)凡ActivityId = (?)"; command.Prepare()command.Parameters.Add(新OleDbParameter(“DirectionCode”,Microsoft.Crm.Platform.Types.EVENT_DIRECTION.ED_INCOMING)); command.Parameters.Add(新OleDbParameter(“StateCode” , Microsoft.Crm.Platform.Types.ACTIVITY_STATE.ACTS_CLOSED)); command.Parameters.Add(新OleDbParameter(“PriorityCode”,Microsoft.Crm.Platform.Types.PRIORITY_CODE.PC_MEDIUM)); command.Parameters.Add(新 OleDbParameter(“ActivityId”,emailId)); log.Debug(“準備更新活動代碼”+ emailId.ToString(“乙”)+“在ActivityBase”); command.ExecuteNonQuery();)捕獲(異常五)( log.Debug(e.Message +“”+ e.StackTrace);))公共無效UpdateActivityQueueCodes項(GUID emailId中,GUID queueId)(嘗試(OleDbCommand的命令= conn.CreateCommand(); command.CommandText =“更新QueueItemBase確定的優先=(?),國家=(?),QueueId = (?)其中的ObjectID = (?)"; command.Prepare()command.Parameters.Add(新OleDbParameter(“優先權”,Microsoft.Crm.Platform.Types.PRIORITY_CODE.PC_MEDIUM)); command.Parameters.Add(新OleDbParameter(“國家”, Microsoft.Crm.Platform.Types.ACTIVITY_STATE.ACTS_CLOSED)); command.Parameters.Add(新OleDbParameter(“QueueId”,queueId)); command.Parameters.Add(新OleDbParameter(“的ObjectID”,emailId));日誌。調試(“準備更新 活動隊列代碼“+ emailId.ToString(”乙“)+”在QueueItemBase“); command.ExecuteNonQuery();)捕獲(異常五)(log.Debug(e.Message +”“+ e.StackTrace);) )快樂定制,實施和修改!如果你想 我們做的工作-給我們打電話1-866-528-0577! help@albaspectrum.comAbout的AuthorBoris馬庫什金鉛是軟件開發人員在Alba頻譜技術?美國全國微軟CRM,微軟大平原

文章來源: Messaggiamo.Com

Translation by Google Translator





Related:

» Seo Elite: New Seo Software!
» AntiSpywareBOT
» Reverse Mobile
» Error Nuker


網管得到HTML代碼
加上這條到你的網站!

網站管理員提交你的文章
無須登記!填寫好的表格和你的文章是在 Messaggiamo.Com 目錄!

Add to Google RSS Feed See our mobile site See our desktop site Follow us on Twitter!

提交你的文章,以 Messaggiamo.Com 目錄

分類


版權 2006-2011 Messaggiamo.Com - 網站地圖 - Privacy - 網站管理員提交你的文章,以 Messaggiamo.Com 目錄 [0.01]
Hosting by webhosting24.com
Dedicated servers sponsored by server24.eu