钉钉二次开发c#发起审批

  string token = _t.GetTokens();


        
        IDingTalkClient client = new DefaultDingTalkClient("https://eco.taobao.com/router/rest");
        SmartworkBpmsProcessinstanceCreateRequest req = new SmartworkBpmsProcessinstanceCreateRequest();
        req.AgentId = ;
        req.ProcessCode = "";
        req.OriginatorUserId = "";
        req.DeptId = ;
        req.Approvers = "";


        List<SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain> list2 = new List<SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain>();
        SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain obj3 = new SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain();
        

        obj3.Name = "名称";
        obj3.Value = "吃饭";

        list2.Add(obj3);

        SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain obj4 = new SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain();
        

        obj4.Name = "年龄";
        obj4.Value = "18";

        list2.Add(obj4);

        SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain obj5 = new SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain();

        list2.Add(obj5);
        obj5.Name = "性别";
        obj5.Value = "";
        


        req.FormComponentValues_ = list2;


        SmartworkBpmsProcessinstanceCreateResponse rsp = client.Execute(req, token);
        return rsp.Result.ProcessInstanceId;

 钉钉视频教程

posted @ 2019-12-26 13:18  唐尧  阅读(1574)  评论(1编辑  收藏  举报