質問

when i try to add listitem to custom list by CSOM there is a problem in getting the name of fields field name in the list is"Pieces Unaccompanied Hold Baggage(Rush)" ,but when i try to add item ,error fires that the field does not exist

code:

oListItem.set_item('Pieces Unaccompanied Hold Baggage(Rush)', "value");

役に立ちましたか?

解決

You got an extra ")" in your code. It should be this way:

oListItem.set_item('Pieces Unaccompanied Hold Baggage(Rush)', "value");

But, in oListItem.set_item() method, the first parameter shoult be the INTERNAL NAME of the field. You will find the internal name in the URL when you open the field (column) settings. So it should be

oListItem.set_item('InternalName', value)
ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top