CRM 可以实现plugin之前的值传递.

我们可以使用SharedVariables 把值在plugin之间传递

实现plugins之间的传递非常简单,我们只需要用key value pair来配对传递.

读取的时候用key来获取相应key的value

try
{
/*
* SharedVariabls can share the variabls to different plugins
* SharedVariabls will only work under same pipeline
*
*/ // How to setup SharedVariables value
context.SharedVariables.Add("Key1", "Some Info"); // How to retrieve SharedVariables value
string key = context.SharedVariables["Key1"].ToString(); } catch (FaultException<OrganizationServiceFault> ex)
{
throw new InvalidPluginExecutionException("An error occurred in MyPlug-in.", ex);
} catch (Exception ex)
{
tracingService.Trace("MyPlugin: {0}", ex.ToString());
throw;
}

创建一个dynamics 365 CRM online plugin (八) - 使用Shared Variables 在plugins 之前传递data的更多相关文章

  1. 创建一个dynamics 365 CRM online plugin (九) - Context.Depth

    让我们来看看官方文档是怎么讲的 https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide ...

  2. 创建一个dynamics 365 CRM online plugin (七) - plugin当中的Impersonation角色

    我们之前创建的plugin都是使用default的 run in User's Context. 理解就是使用正在登陆的security context用户信息 那有个问题,如果当前用户的securi ...

  3. 创建一个dynamics 365 CRM online plugin (四) - PreValidation

    开始之前,我们要确认一下 Plugin 的 pipeline. PreValidation -> PreOperation -> Server Side System Main Event ...

  4. 创建一个dynamics 365 CRM online plugin (三) - PostOperation

    上两节我们创建了一个 PreOperation的plugin 今天我们创建一个PostOpeartion的plugin和之前的plugin连接起来 当创建contact之后,我们要添加一个task给新 ...

  5. 创建一个dynamics 365 CRM online plugin (一) - Hello World Plugin

    源代码连接:https://github.com/TheMiao/Dynamics365CRM/blob/master/MyCRM/MyCRM/HelloWorld.cs 首先,我们需要创建一个.NE ...

  6. 创建一个dynamics 365 CRM online plugin (十) - Isolation mode or trust mode

    Isolation Mode 也被称作为Plugin Trust CRM里面有两种plugin trust / isolation mode 1. Full Trust 只在OP系统中可使用,没有限制 ...

  7. 创建一个dynamics 365 CRM online plugin (五) - Images in Plugin

    Snapshots of the primary entity's attributes from database before(pre) and after (post) the core pla ...

  8. 创建一个dynamics 365 CRM online plugin (六) - Delete plugin from CRM

    我们之前都学习到怎么添加,debug还有update plugin. 今天带大家过一下怎么从CRM instance当中删除plugin. 首先让我们打开Settings -> Customiz ...

  9. 创建一个dynamics 365 CRM online plugin (二) - fields检查

    Golden Rules 1. Platform only passes Entity attributes to Plugin that has change of data. 2. If the ...

随机推荐

  1. ajax csrf

    data 里加 csrfmiddlewaretoken:$("[name='csrfmiddlewaretoken']").val(), 还要再 form表单里加{% csrf_t ...

  2. if else 和if elif else的区别

    def fuck(a): if a ==1: print(a) if a ==2: print("not good") else: print("tamade" ...

  3. 以方法调用的原理解释Ruby中“puts ‘Hello‘”

    这里尽管缺少消息发送所需要的点(.)以及该消息的显示接收者,却依然发送了消息puts并传递了参数“Hello”给一个对象:默认对象self.在程序运行期间,虽然作为self的对象通过特定规则发生改变, ...

  4. Jenkins 随笔

    window是 随笔 修改端口 :  <arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsService ...

  5. hadoop题目(一)

    一.简要描述如何安装配置一个开源hadoop,只描述即可,列出完整步骤. 答:①创建一个用户和用户组,用来管理hadoop项目:   ②修改确定IP地址:vim /etc/sysconfig/netw ...

  6. Unity more efficient find

    Unity caches GameObjects based on their tags, so in a big scene with lots of objects, GameObject.Fin ...

  7. Linux:Gentoo系统的安装笔记(二)

    这期笔记继续安装Gentoo,上期我们已经到了可以进入新环境了,这意味着就是将原来的安装CD或其它介质改为硬盘上安装系统了,话不多说,马上开始! 恢复安装 由于我已经中断了安装,对于已经可以进入新环境 ...

  8. TCP学习总结(四)

    TCP连接管理 TCP运输连接有3个阶段, 即: 连接建立,数据传送和连接释放. 1. TCP的连接建立(3次握手) TCP连接的建立采用客户服务器方式.主动发起连接建立的应用进程叫做客户(clien ...

  9. 最常用的JavaScript类的定义

    混合的构造函数/原型方式 联合使用构造函数和原型方式,就可像用其他程序设计语言一样创建对象.这种概念非常简单,即用构造函数定义对象的所有非函数属性,用原型方式定义对象的函数属性(方法).结果是,所有函 ...

  10. python爬虫,使用urllib2库报错

    urllib2发生报错URLError: <urlopen error [Errno 10061]:首先检查网址是否正确其次如果报这种错误,是因为ie里设置了代理,取消即可, 步骤: 打开IE浏 ...