博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SharePoint 客户端对象模型 多选查阅项赋值
阅读量:6994 次
发布时间:2019-06-27

本文共 1053 字,大约阅读时间需要 3 分钟。

var clientContext = new SP.ClientContext.get_current(); //if the page and the list are in same site.If list is in different site then use relative url instead of get_currentvar oList = clientContext.get_web().get_lists().getByTitle('Contacts');var itemCreateInfo = new SP.ListItemCreationInformation();var oListItem = oList.addItem(itemCreateInfo);var contactTypes = null;$.each(contact.contactTypes, function (index, contactType) {    if (index != 0)        contactTypes += ';#' + contactType.id + ';#' + contactType.title;    else        contactTypes =  contactType.id + ';#' + contactType.title;});// other set_item statements omitted for brevityoListItem.set_item('ContactType', contactTypes);oListItem.update();clientContext.executeQueryAsync(    // success return    function () {        var success = true;    },    // failure return    function (sender, args) {        window.alert('Request to create contact failed. ' + args.get_message() +                '\n' + args.get_stackTrace());    })

转载于:https://www.cnblogs.com/tengfei8/p/8560408.html

你可能感兴趣的文章
Disruptor剖析
查看>>
oracle数据仓库物理模型设计
查看>>
Squid三种代理方式的实现及ACL
查看>>
在透视表中定义公式
查看>>
我的友情链接
查看>>
close_wait状态的产生原因及解决(1)
查看>>
堆(heap)
查看>>
Windows Server 2016-图形化之客户端加域(一)
查看>>
Silverlight 版 C1OutlookBar 初体验
查看>>
使用Visual Studio 2012 开发 Html5 应用
查看>>
通过案例学调优之--Oracle 全文索引
查看>>
Java自带的性能监测工具之jstat
查看>>
HBase Shell 基本操作
查看>>
samba
查看>>
网站制作的注意事项
查看>>
Exchange会议室的应用之Redis内存数据库
查看>>
浅谈分布式并发控制
查看>>
C#高级编程之委托
查看>>
2018.12.7python笔记(3.3-3.5)
查看>>
数据类型之间的运算
查看>>