• CRM 各种类型字段的 赋值 取值


    //lookup
    RecordEntity["new_lead"] = new EntityReference(entity.LogicalName, entity.Id);


    获取时间 DateTime bg1 = Convert.ToDateTime(m["new_begintime"]).AddHours(8);
    赋值时间 DateTime nowtime=DateTime.Now;
    m["new_begintime"]=nowtime

    Picklist 后台取值
    Int i= (oppentity["new_listenfinal"] as OptionSetValue).Value ;
    picklist赋值
    RecordEntity["new_interactiveplatform"] = new OptionSetValue(100000004);

    两个选项取值
    (bool)(Entity[“attributename”])==false;
    两个选项赋值
    question["new_isornoappoint"] = true;

    货币取值
    decimal price = Convert.ToDecimal(0);
    price = ((Money)entity["new_shareprice"]).Value;
    货币赋值
    entercontract["new_ftmoney"] = new Money(((Money)entercontract["new_ftmoney"]).Value+price);


  • 相关阅读:
    api示例
    Windows+Ubuntu文件互传
    UI
    事件
    插件开发入门
    文摘
    刘海屏适配
    APT
    热修复
    进程保活
  • 原文地址:https://www.cnblogs.com/jayblog/p/9318415.html
Copyright © 2020-2023  润新知