سؤال

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