本文介绍了如何在Project Online中使用JSOM创建查找表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个代码并在executeQueryAsync上出错,并且没有创建查找表。

我找不到任何示例代码,任何帮助都将不胜感激。

I have this code and get error on executeQueryAsync, and look up table is not created.
There is no sample code for this anywhere that I can find, any help would be appreciated.

        

       

var newLut =
new PS.LookupTableCreationInformation();

varnewLut =newPS.LookupTableCreationInformation();

       

       

var newLutId = SP.Guid.newGuid();

varnewLutId = SP.Guid.newGuid();

        newLut.set_id(newLutId);

        newLut.set_id(newLutId);

        newLut.set_name(lutName)

        newLut.set_name(lutName)

        newLut.set_sortOrder(lutSortOrder);

        newLut.set_sortOrder(lutSortOrder);

       

       

var lookupMask =
new PS.LookupMask()

varlookupMask =newPS.LookupMask()

        lookupMask.set_length = 0;

        lookupMask.set_length = 0;

        lookupMask.set_maskType = 3;

        lookupMask.set_maskType = 3;

        lookupMask.set_separator =

        lookupMask.set_separator =

"。" ;

".";

        newLut.set_masks(lookupMask);

        newLut.set_masks(lookupMask);

       

       

        lookupTables.add(newLut);

        lookupTables.add(newLut);

        lookupTables.update(newLut);

        lookupTables.update(newLut);

        projContext.executeQueryAsync(

        projContext.executeQueryAsync(

推荐答案

projContext.executeQueryAsync(queySuccess, queryFailed);

function querySuccess()
{
  // do actions if successful
}

function queryFailed()
{
  // do actions if failed
}


这篇关于如何在Project Online中使用JSOM创建查找表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 03:14