Пример #1
0
        public void TestCreateOptionSetField()
        {
            var metadataHelper = new FieldMetadataHelper();
            var response       = metadataHelper.CreateOptionSetField(
                "new_bankaccount",              // Entity名称
                "new_optionset",                // Filed名称
                "OptionSet",                    // Field显示名称
                string.Empty,                   // Field描述
                new Dictionary <string, int>    // OptionSet选项集
            {
                { "Green", 1 },
                { "Yellow", 2 },
                { "Red", 3 },
                { "Black", 4 }
            },
                false,                          // IsGlobal
                AttributeRequiredLevel.None     // 字段需要级别
                );

            Assert.IsNotNull(response);
            Debug.WriteLine("AttributeId:" + response.Results["AttributeId"]);
        }