如何以编程方式(通过插件)获取CRMWRPCToken& CRM 2011中的CRMWRPCTokenTimeStamp? [英] How to get programmatically(via plugin) CRMWRPCToken & CRMWRPCTokenTimeStamp in CRM 2011?

查看:136
本文介绍了如何以编程方式(通过插件)获取CRMWRPCToken& CRM 2011中的CRMWRPCTokenTimeStamp?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们!:)
我与CRM 2011&我需要通过附件GUID为带有C#插件的实体记录中的附件自动生成附件的下载链接。



此链接如下所示:


/SERVER/ORGANIZATION_NAME/Activities/Attachment/download.aspx?AttachmentType=5&
AttachmentId = {GUID}& IsNotesTabAttachment = 1& CRMWRPCToken = 8oi054LNEeOd7QAVXZNIANwO8jNsflfFQ75fqPK2zC4Az6I2yWatX71ugBe7bgHy& CRMWRPCTokenTimeStamp = b> b $ t
> $ p'b知道如何获得这些CRMWRPCToken& CRMWRPCTokenTimeStamp。有人可以帮我吗?

解决方案

您无法生成CRMWRPCToken& CRMWRPCTokenTimeStamp值。您不需要,因为调用URL时这些将由CRM本身处理。进行呼叫的用户将需要向CRM进行身份验证-如果要成为匿名用户,则需要在调用者和CRM之间放置一个可以支持匿名用户的代理站点-CRM无法直接支持匿名用户。



执行此操作的最佳,最容易支持的方法是,将用户定向到URL中带有注释的guid的HTML WebResource。然后在WebResource中,获取URL并调用 Xrm.Utility.openEntityForm( annotation,注解ID)以打开一个对话框来下载文件。假设用户通过了CRM的身份验证,那么它将很好用,并且您不必担心它会被破坏。


guys!:) I work with CRM 2011 & I need to automatically generate download link for attachments in entities records with C# plugin via attachment GUID.

This link looks like this:

/SERVER/ORGANIZATION_NAME/Activities/Attachment/download.aspx?AttachmentType=5& AttachmentId={GUID}&IsNotesTabAttachment=1&CRMWRPCToken=8oi054LNEeOd7QAVXZNIANwO8jNsflfFQ75fqPK2zC4Az6I2yWatX71ugBe7bgHy&CRMWRPCTokenTimeStamp=635273624756233624

But I haven't got any idea, how to get these CRMWRPCToken&CRMWRPCTokenTimeStamp. Could anybody help me? Thanks.

解决方案

You cannot generate the CRMWRPCToken & CRMWRPCTokenTimeStamp values. You shouldn't need to as these will be handled by CRM itself when the URL is called. The user making the call will need to authenticate to CRM - if they are to be anonymous users you'll need to put a proxy site between the caller and CRM that can support anonymous users - CRM can't support anonymous users directly.

The best, and most easily supported way to do this, is to direct the user to an HTML WebResource with the annotation's guid in the URL. Then in the WebResource take the URL and call Xrm.Utility.openEntityForm("annotation", annotationid) to open a dialog to download the file. Assuming the user is authenticated to CRM this will work great and you never need to worry about it breaking.

这篇关于如何以编程方式(通过插件)获取CRMWRPCToken& CRM 2011中的CRMWRPCTokenTimeStamp?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆