首页 文章

Netsuite库存项目自定义字段更新

提问于
浏览
0

我试图弄清楚如何更新Netsuite中的InventoryItem记录上的自定义字段 . 我可以更新常规字段,但似乎无法更新任何内容

InventoryItem item = new InventoryItem();
WriteResponse response;
List<CustomFieldRef> oCustomFieldRefList = new List<CustomFieldRef>();

item.internalId = "9";
StringCustomFieldRef objStringCustomFieldRef = new StringCustomFieldRef();
objStringCustomFieldRef.internalId = "custitem_main_photo";
objStringCustomFieldRef.value = "http://www.google.com/test.jpg";
oCustomFieldRefList.Add(objStringCustomFieldRef); 

item.customFieldList = oCustomFieldRefList.ToArray();
response = _nsService.update(item);

更新调用返回的状态为Success . 它只是不更新自定义字段 . 我尝试过不同的领域和类型,但似乎没有什么可以保存的 .

1 回答

  • 0

    自定义字段的internalId是数字ID,而不是字符串id . 不知道为什么文档都显示字符串id值,但使用数字修复了我的问题 .

相关问题