如何获取多事件属性的值?
我在这里找到了部分解决方案,但不清楚获取 EntryNode。
如何获取多事件属性的值?
我在这里找到了部分解决方案,但不清楚获取 EntryNode。
这是始终返回相同代码的部分:
rawCode=item.getEntryRelationshipAttrib("Product Master Catalog Spec/Raw Materials Details/Code");
那是因为它总是返回第一次出现。我认为您的代码应如下所示:
pnode = entrynode.getEntryNodeParent();
attribCode = pnode.getEntryNode("/Code").getEntryNodeValue();
//This returns the path with the # and the correct order.
attribCodePath = pnode.getEntryNode("/Code").getEntryNodeExactPath();
rawCode=item.getEntryRelationshipAttrib(attribCodePath);
rawmatCode = rawCode[1];
var rawCatalog = getCtgByName("Raw Material Catalog") ;
rawMatItem = rawCatalog.getCtgItemByPrimaryKey(rawmatCode);
rawMatCost = rawMatItem.getEntryAttrib("Raw Material Details Spec/Cost") ;
attribQty = pnode.getEntryNode("/Qty").getEntryNodeValue();
res=attribQty*rawMatCost;