【发布时间】:2020-06-16 10:59:26
【问题描述】:
我正在尝试使用 spfx 与 Graph API 反应在 sharepoint 中的现有列表中创建一个新列表项。
const obj: string = JSON.stringify({
'LinkTitle': `Item ${new Date()}`,
'Contactlist': '555555555',
'CompanyName': 'dfvb',
'Country': 'asd'
});
this.props.context.msGraphClientFactory
.getClient()
.then((client: MSGraphClient): void => {
// get information about the current user from the Microsoft Graph
client
.api("sites('root')/lists('Contactlist')/items")
.post(obj).then(() => {
console.log('obj' + obj);
});
});
但它发布了一个没有值的列表项。
sharepoint list item with no values
我希望将 obj 发布到联系人列表中。
【问题讨论】:
标签: sharepoint