我需要一个父产品类别的所有儿童(及其子女)。
示例:
Parent
-- child 1
-- child 2
---- child 2.1
---- child 2.2
-- child 3我使用的是EcoResCategory.getChildren()方法,但是它只得到第一个孩子。
发布于 2022-01-25 13:24:58
“但它只得到第一个孩子”
我不认为这是正确的。如果您查看EcoResCategory.getChildren()方法的引用,就会看到WarrantyLookupProcessingJob.updateLookupCategory()方法,它显示了以下模式:
EcoResCategory childCategory = parentCategory.getChildren();
while (childCategory)
{
next childCategory;
}next关键字从childCategory表缓冲区检索下一条记录。另见https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-data/xpp-select
还请注意,getChildren方法有一个带有以下文档的_levelLimit参数:An <c>EcoResCategoryLevel</c> value that indicates the maximum level of children categories to retrieve.
https://stackoverflow.com/questions/70847594
复制相似问题