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. 汉诺塔问题-递归实现-JAVA

    public class hanio { /** * @param args */ public static void main(String[] args) { // TODO Auto-gene ...

  2. 小练习_num1

    题目:将一个正整数分解质因数.例如:输入90,打印输出90=2*3*3*5. /* 分解质因数 */ import java.util.*; class num1 { public static vo ...

  3. 对弈win32笔记

    对弈的win32笔记   一:Windows程序运行原理 一.Windows四大模块程序 1.1控制台程序 没有自己的窗口,dos-显示或者运行程序,入口mian() 1.2窗口程序 有自己的窗口,w ...

  4. JavaScript 实时 全角转半角

    //JavaScript全角字符转半角(参数str为input框输入的内容)var $fullChar2halfChar = function(str) { var result = ''; for ...

  5. Jsoup获取全国地区数据(省市县镇村)

    最近手头在做一些东西,需要一个全国各地的地域数据,从省市区到县镇乡街道的.各种度娘,各种谷歌,都没找到一个完整的数据.最后功夫不负有心人,总算找到一份相对来说比较完整的数据,但是这里的数据也只是精确到 ...

  6. tensorFlow入门实践(一)

    首先应用TensorFlow完成一个线性回归,了解TensorFlow的数据类型和运行机制. import tensorflow as tf import numpy as np import mat ...

  7. python命令行运行py文件找不到模块的解决办法

    问题: 新建了一个项目,目录结构如下: 然后在pycharm中运行glovar是没有问题的,但是在命令行中运行就会提示找不到init模块 这是因为在pycharm中运行的时候,pycharm会自动将项 ...

  8. ansible小计

    一.忽略hosts,只在一台机器上执行: /usr/local/bin/ansible-playbook /app/ansiblecfg/ztr/ent_extract.yml --limit=10. ...

  9. ABP中mapping中忽略属性

    创建一个XXXXProfile继承Profile,然后在构造函数中写忽略相关的,如下 public class ProductPriceDtoProfile: Profile { /// <su ...

  10. WEEX入坑指南(1)

    weex create newtest 然后在某个阶段卡死, 解决方案: 在路径下创建新建文件夹,并命名为项目的名称.