我很擅长与Netsuite整合。我已经在Netsuite应用程序中创建了自定义记录和一些字段以及值,现在我想从Webservice请求中获取这些值。我得到了标签,但我无法获得价值。
CustomRecordType record = (CustomRecordType)response.getRecord();
CustomRecordTypeFieldList fields = record.getCustomFieldList();
CustomRecordCustomField[] crcf = fields.getCustomField();
for(CustomRecordCustomField c:crcf)
{
System.out.println(c.getLabel());
}
答案 0 :(得分:0)
这是C#或Java - 而不是我强大的ponit。但是,在加载记录后,您应该可以执行以下操作:
record.fieldname
答案 1 :(得分:0)
customRec.setTypeId( “626”); customRec.setInternalId( “202”);
ReadResponse response = _port.get(customRec);
CustomRecord record=(CustomRecord)response.getRecord();
CustomFieldList fields=record.getCustomFieldList();
CustomFieldRef[] crcf=fields.getCustomField();
int i=1;
Map<String,Object> test=new HashMap<String,Object>();
for(CustomFieldRef c:crcf)
{
System.out.println(c.getScriptId());
if(c instanceof StringCustomFieldRef)
{
test.put(p.getProperty(c.getScriptId()),((StringCustomFieldRef)c).getValue());
}else if(c instanceof DateCustomFieldRef)
{
test.put(p.getProperty(c.getScriptId()),((DateCustomFieldRef)c).getValue().getTime());
}
else if(c instanceof LongCustomFieldRef)
{
test.put(p.getProperty(c.getScriptId()),((LongCustomFieldRef)c).getValue());
}
//System.out.println(c.getLabel()+" fieldtypes: "+c.getFieldType().getValue());
i++;
}
for(Map.Entry<String,Object> entry:test.entrySet())
{
System.out.println(entry.getKey()+"--->"+entry.getValue());