如何使用SuiteTalk搜索仅库存物品 [英] How to search for only inventory items using SuiteTalk

查看:114
本文介绍了如何使用SuiteTalk搜索仅库存物品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS 2013中使用C#.

I'm using C# in VS 2013.

我使用以下代码:

    var request = new ItemSearchBasic
    {
        type = new SearchEnumMultiSelectField
        {
            searchValue = new string[]
            {
                "_inventoryItem"
            },
            @operator = SearchEnumMultiSelectFieldOperator.anyOf,
            operatorSpecified = true
        }

    };

我不仅得到库存物品,还得到其他类型的物品.

and I get not just inventory items but other types of item too.

我的肥皂请求如下:

<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Header>
        <passport xmlns="urn:messages_2014_2.platform.webservices.netsuite.com">
            <email xmlns="urn:core_2014_2.platform.webservices.netsuite.com">xxxxxxxxx</email>
            <password xmlns="urn:core_2014_2.platform.webservices.netsuite.com">********************</password>
            <account xmlns="urn:core_2014_2.platform.webservices.netsuite.com">xxxxxxxxx</account>
            <role internalId="3" xmlns="urn:core_2014_2.platform.webservices.netsuite.com"/>
        </passport>
        <searchPreferences xmlns="urn:messages_2014_2.platform.webservices.netsuite.com">
            <bodyFieldsOnly>false</bodyFieldsOnly>
            <pageSize>5</pageSize>
        </searchPreferences>
    </soap:Header>
    <soap:Body>
        <search xmlns="urn:messages_2014_2.platform.webservices.netsuite.com">
            <searchRecord xsi:type="q1:ItemSearchBasic" xmlns:q1="urn:common_2014_2.platform.webservices.netsuite.com">
                <q1:type operator="anyOf">
                    <searchValue xmlns="urn:core_2014_2.platform.webservices.netsuite.com">_inventoryItem</searchValue>
                </q1:type>
            </searchRecord>
        </search>
    </soap:Body>
</soap:Envelope>

NetSuite帮助没有提到如何按项目类型进行过滤,我已经从各种非NetSuite网页中猜到了这种方法.

The NetSuite help does't mention how to filter by item type and I've guessed this method from various non-NetSuite web pages.

如果我删除类型上的过滤器,那么我的搜索将返回stockItem,serializedInventoryItem,lotNumberedInventoryItem和nonInventoryPurchaseItem.

If I remove the filter on type then my search returns inventoryItem, serializedInventoryItem, lotNumberedInventoryItem and nonInventoryPurchaseItem.

如果我使用_inventoryItem过滤器,那么我将获得stockItem,serializedInventoryItem和lotNumberedInventoryItem.因此,也许NetSuite认为serializedInventoryItem和lotNumberedInventoryItem都属于stockItem.

If I use the _inventoryItem filter then I get inventoryItem, serializedInventoryItem and lotNumberedInventoryItem. So maybe NetSuite considers serializedInventoryItem and lotNumberedInventoryItem to both be inventoryItem.

推荐答案

如果您需要更详细地区分(库存)项目,则可以使用'isSerialItem','isLotItem'和'subType'(用于购买/转售/销售)搜索过滤器.

If you need to distinguish (Inventory) Items in more detail, you can use 'isSerialItem', 'isLotItem' and 'subType' (for purchase/resale/sale) search filters in the search request.

这篇关于如何使用SuiteTalk搜索仅库存物品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆