1:  string entNames = "new_print_plan,new_radio_plan,new_bill_board,new_tv_plan,new_btl_posm,new_btl_poe_fixed,new_promotion_girls,new_promotion_events,new_digital_plan";
  2:             string fieldNames = "new_actual_is_cancel,new_is_in_plan";
  3:             foreach (string entityName in entNames.Split(','))
  4:             {
  5:                 foreach (string fieldName in fieldNames.Split(','))
  6:                 {
  7:
  8:                     RetrieveAttributeRequest rar = new RetrieveAttributeRequest()
  9:                     {
 10:                         EntityLogicalName = entityName,
 11:                         LogicalName = fieldName
 12:                     };
 13:
 14:                     var am = (RetrieveAttributeResponse)service.Execute(rar);
 15:                     if (am.AttributeMetadata.AttributeType == AttributeTypeCode.Boolean)
 16:                     {
 17:                         var bam = am.AttributeMetadata as BooleanAttributeMetadata;
 18:                         bam.DefaultValue = true;
 19:
 20:                         UpdateAttributeRequest uar = new UpdateAttributeRequest()
 21:                         {
 22:                             EntityName = entityName,
 23:                             Attribute = bam
 24:                         };
 25:
 26:                         service.Execute(uar);
 27:                     }
 28:                 }

CRM 2013 批量更新two options的缺省值的更多相关文章

  1. mysql进阶(十四) 批量更新与批量更新多条记录的不同值实现方法

    mysql 批量更新与批量更新多条记录的不同值实现方法 在mysql中批量更新我们可能使用update,replace into来操作,下面详细介绍mysql批量更新与性能. 批量更新 mysql更新 ...

  2. mysql语句:批量更新多条记录的不同值[转]

    mysql语句:批量更新多条记录的不同值 mysql更新语句很简单,更新一条数据的某个字段,一般这样写: 帮助 1 UPDATE mytable SET myfield = 'value' WHERE ...

  3. mybatis批量更新update-设置多个字段值 报错 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

    mybatis批量更新update-设置多个字段值 2016年08月01日 12:49:26 姚一号 阅读数:29539 标签: mysql mybatis批量更新批量更新allowMultiQuer ...

  4. mysql 批量更新与批量更新多条记录的不同值实现方法

    批量更新 mysql更新语句很简单,更新一条数据的某个字段,一般这样写: 代码如下: UPDATE mytable SET myfield = 'value' WHERE other_field = ...

  5. mysql 批量更新与批量更新多条记录的不同值实现方法

    作者: 字体:[增加 减小] 类型:转载 时间:2013-10-02 我要评论 在mysql中批量更新我们可能使用update,replace into来操作,下面小编来给各位同学详细介绍mysql ...

  6. 【转】【MySql】Update批量更新与批量更新多条记录的不同值实现方法

    批量更新 mysql更新语句很简单,更新一条数据的某个字段,一般这样写: UPDATE mytable SET myfield = 'value' WHERE other_field = 'other ...

  7. 转载 【MySql】Update批量更新与批量更新多条记录的不同值实现方法

    批量更新 mysql更新语句很简单,更新一条数据的某个字段,一般这样写: UPDATE mytable SET myfield = 'value' WHERE other_field = 'other ...

  8. 【MySql】Update批量更新与批量更新多条记录的不同值实现方法

    mysql更新语句很简单,更新一条数据的某个字段,一般这样写: UPDATE mytable SET myfield = 'value' WHERE other_field = 'other_valu ...

  9. mysql语句:批量更新多条记录的不同值

    mysql更新语句很简单,更新一条数据的某个字段,一般这样写: 1 UPDATE mytable SET myfield = 'value' WHERE other_field = 'other_va ...

随机推荐

  1. 记一次网页超时登录的Bug

    前几天,在做全公司的员工测评工作,在一个页面弹出导入页面,并导入所有评价记录,然后关闭掉这个导入页面,最后返回当前页面,返回时刷新当前页面. 在返回的时候,就出现了“页面超时登录”同时返回登录首页的问 ...

  2. [Oracle][Partition][Controlfile]Partition 操作是否和 Controlfile有关?

    Partition 操作是否和 Controlfile有关? 通过实验来判断: 对比 Partition 前后的操作,看看controlfile 的dump 信息中是否有记录,结果发现没有记录在 co ...

  3. 【Java并发.1】简介

    继上一本<深入理解Java虚拟机>之后,学习计划里的另一本书<Java并发编程实战>现在开始学习,并记录学习笔记. 第一章主要内容是介绍 并发 的简介.发展.特点. 编写正确的 ...

  4. 更换Ubuntu源为国内源的操作记录

    我们都知道,Ubuntu的官方源对于国内用户来说是比较慢的,可以将它的源换成国内的源(比如阿里源),这样用起来就很快了.下面记录下更换操作: 首先了解下/etc/apt/sources.list文件 ...

  5. c#代码分析

    代码分析是在一个IT行业计算机程序员必须要具有的基本专业技能,在了解一定的专业基础之上去看懂别人编写的代码,分析别人代码实现的功能,以及基本的维护和扩展测试.不同的人有不同的代码风格,要使自己的能要别 ...

  6. Opentsdb 启动显示配置文件不存在

    今天 重新启动opentsdb  出现本地配置文件不存在   这不知道  我查了一下官网 了解到 You can use the --config command line argument to s ...

  7. NumsCount

    package com.home.test; import java.util.Arrays; public class NumsCount { public void getNumCount(int ...

  8. Mybatis Update statement Date null

    Mybatis Update statement Date null 只要在Model里把字段置为java的null即可.

  9. shell of leetcode

    1.Tenth Line How would you print just the 10th line of a file? For example, assume that file.txt has ...

  10. vue render function & dataset

    vue render function & dataset https://vuejs.org/v2/guide/render-function.html#The-Data-Object-In ...