我怎样才能在没有 repetition/duplication 的情况下进行 itemfulfillment 搜索

How can i get itemfulfillment search without repetition/duplication

我正在对 itemfulfillment 记录执行 nlapiSearchRecord 函数,搜索工作正常,但其 return 结果为 repetition/duplicate。 下面是我的工作代码,我只想知道我应该使用哪个过滤器来避免 repetition/duplicate 记录。

 var filters = [
                    new nlobjSearchFilter('internalid', null, 'is',id),
                    new nlobjSearchFilter('mainline', null, 'is', 'F'),
                    new nlobjSearchFilter('shipping', null, 'is', 'F'),
                    new nlobjSearchFilter('taxline', null, 'is', 'F')

                    ], columns = [
                        new nlobjSearchColumn('trandate'), 
                        new nlobjSearchColumn('tranid'), 
                        new nlobjSearchColumn('item'),
                        new nlobjSearchColumn('quantity'),
                        new nlobjSearchColumn('location')                            
                    ];

                    var searchresults = lapiSearchRecord('itemfulfillment',null, filters, columns);

下面是搜索结果,供您理解,您可以看到有一件商品重复了两次,数量为正,一次为负。

[{"id":"123","recordtype":"itemfulfillment", "columns":{"trandate":"2/1/2222","tranid":"xx-xxxx","status":{"name":"xxxx","internalid":"xxxx"},"item":{"name":"Test-1","internalid":"1111"},"quantity":1,"location":{"name":"xxxx","internalid":"xxx"}}}, {"id":"123","recordtype":"itemfulfillment", "columns":{"trandate":"2/1/2222","tranid":"xx-xxxx","status":{"name":"xxxx","internalid":"xxxx"},"item":{"name":"Test-1","internalid":"1111"},"quantity":1,"location":{"name":"xxxx","internalid":"xxx"}}},{"id":"123","recordtype":"itemfulfillment", "columns":{"trandate":"2/1/2222","tranid":"xx-xxxx","status":{"name":"xxxx","internalid":"xxxx"},"item":{"name":"Test-1","internalid":"xxxx"},"quantity":-1,"location":{"name":"xxxx","internalid":"xx"}}},{"trandate":"2/1/2222","tranid":"xx-xxxx","status":{"name":"xxxx","internalid":"xxxx"},"item":{"name":"XXXXX","internalid":"1111"},"quantity":1,"location":{"name":"xxxx","internalid":"xxx"}}}, {"id":"123","recordtype":"itemfulfillment", "columns":{"trandate":"2/1/2222","tranid":"xx-xxxx","status":{"name":"xxx","internalid":"xxxx"},"item":{"name":"Test-2","internalid":"xyz"},"quantity":2,"location":{"name":"xxx","internalid":"xxxx"}}},{"id":"123","recordtype":"itemfulfillment","columns":{"trandate":"2/1/2222","tranid":"xx-xxxx","status":{"name":"xxxx","internalid":"xxxx"},"item":{"name":"Test-2","internalid":"xyz"},"quantity":2,"location":{"name":"xxxx","internalid":"10"}}},{"id":"123","recordtype":"itemfulfillment", "columns":{"trandate":"2/1/2222","tranid":"xx-xxxx","status":{"name":"xxxx","internalid":"xxxx"},"item":{"name":"Test-2","internalid":"xyz"},"quantity":-2,"location":{"name":"xxxx","internalid":"xxxx"}}}]

你能指导我如何在没有任何物品的情况下获得物品吗repetition/duplication。

正数和负数与履行创建的 G/L 个条目有关。

选择您感兴趣的交易方的 G/L 帐户作为另一个过滤器。