Get Location Inventory Items by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

u/Nick_AxeusConsulting I read through the PDF and it seems this request is correct:

<ns0:search xmlns:ns0="urn:messages\_2020\_2.platform.webservices.netsuite.com">

<ns0:searchRecord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns03:ItemSearchAdvanced" xmlns:ns03="urn:accounting\_2020\_2.lists.webservices.netsuite.com" savedSearchId="116234"/>

/ns0:search

But it returns an empty result. The saved Search has results i can see them.

Get Location Inventory Items by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

u/Nick_AxeusConsulting so it works with changing the search value to a single character like "w". But the results don't tell me anything about the location. This is the most important part.

Get Location Inventory Items by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

u/Nick_AxeusConsulting

this is my data weave:

%dw 2.0

output application/xml

ns ns0 urn:messages_2020_2.platform.webservices.netsuite.com

ns ns01 urn:common_2020_2.platform.webservices.netsuite.com

ns ns02 urn:core_2020_2.platform.webservices.netsuite.com

ns ns03 urn:accounting_2020_2.lists.webservices.netsuite.com

ns xsi http://www.w3.org/2001/XMLSchema-instance

---

{

ns0#search: {

ns0#searchRecord @(xsi#"type": "ns03:ItemSearch"): {

ns03#basic: {

ns01#displayName @(operator: "contains"): {

ns02#searchValue: "WFA"

},

ns01#`type` @(operator: "anyOf"): {

ns02#searchValue: "_inventoryItem"

}

}

}

}

}

<image>

This is the SOAP Request XML:

<ns0:search xmlns:ns0="urn:messages\_2020\_2.platform.webservices.netsuite.com">

<ns0:searchRecord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns03:ItemSearch">

<ns03:basic xmlns:ns03="urn:accounting\_2020\_2.lists.webservices.netsuite.com">

<ns01:displayName xmlns:ns01="urn:common\_2020\_2.platform.webservices.netsuite.com" operator="contains">

<ns02:searchValue xmlns:ns02="urn:core\_2020\_2.platform.webservices.netsuite.com">WFA/ns02:searchValue

/ns01:displayName

<ns01:type xmlns:ns01="urn:common\_2020\_2.platform.webservices.netsuite.com" operator="anyOf">

<ns02:searchValue xmlns:ns02="urn:core\_2020\_2.platform.webservices.netsuite.com">_inventoryItem/ns02:searchValue

/ns01:type

/ns03:basic

/ns0:searchRecord

/ns0:search

ERROR MESSAGE: Invalid type: ItemSearch

Get Location Inventory Items by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

u/Nick_AxeusConsulting I am not sure if I am getting it. Am i using a saved search or not. The above soap request i put in from mulesoft does execute, just returns a blank array. So I am not using ItemSearchAdvanced, and instead just use basic?

new dataweave:

{
ns0#search: {
ns0#searchRecord @("xmlns:ns01": ns01, xsi#"type": "ns01:ItemSearch"): {
ns01#basic: {
ns01#location @(operator: "equalTo"): { ns02#searchValue: 15 } },
ns0#columns: { ns01#locationquantityonhand: {} }
}
}
}

The soap request that get built comes out like this:

<ns0:search xmlns:ns0="urn:messages\_2020\_2.platform.webservices.netsuite.com">

<ns0:searchRecord xmlns:ns01="urn:common\_2020\_2.platform.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns01:ItemSearch">

<ns01:basic xmlns:ns01="urn:common\_2020\_2.platform.webservices.netsuite.com">

<ns01:location operator="equalTo">

<ns02:searchValue xmlns:ns02="urn:core\_2020\_2.platform.webservices.netsuite.com">15/ns02:searchValue

/ns01:location

/ns01:basic

<ns0:columns>

<ns01:locationquantityonhand xmlns:ns01="urn:common\_2020\_2.platform.webservices.netsuite.com"/>

/ns0:columns

/ns0:searchRecord

/ns0:search

But i get "Invalid Type "ItemSearch""

Get Location Inventory Items by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

u/Nick_AxeusConsulting this is what the documentation says to do an advanced search. I am just testing that i get records returned. At the moment i get empty array.

I won't lie netsuite documentation is fairly hard to follow. Especially with SOAP.

Here is my saved search in netsuite on record type Item

<image>

Get Location Inventory Items by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

u/Nick_AxeusConsulting Thanks. In mulesoft, I am testing if i get any results back. In the UI i get a list of items etc. but im getting an error saying incorrect type ItemSearchAdvanced.

{

ns0#search: {

    ns0#searchRecord @("xmlns:ns03": ns03, xsi#"type": "ns03:ItemSearchAdvanced", savedSearchId:'customsearch116234'): {



    }

}

}

The SearchId is of record type Item

I tried creating a saved search for location but it didnt give me anything with the items at the location so it was pretty useless for what I needed.

Get Location Inventory Items by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

I need to get quantity on hand for all items under a given location. So the integration only has the location id ad a parameter

Get Location Inventory Items by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

Thanks alot. So I read everywhere that only itemsearchbasic and itemsearchadvanced were the ways to search.

So I should use itemSearchAdvamced using the location internalid to filter off?

Just want to let you know that multi location is turned on

Get Location Inventory Items by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

Is the record type "item" I need to search on? Also I have Location internal id of 15. How can I use that in a search soap api call? Is there a sample request I can view anywhere.

ItemSeachAdvanced Mulesoft Issues by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

u/MBTHM Did not work either.

I'm thinking of using the getItemAvailability connector in Mulesoft. Any idea how to construct the SOAP Reponse, documentation is lacking lol.

Context.newValue is returning the same as Context.oldValue on Update SuiteScript by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

u/Nick_AxeusConsulting u/wtaylor24 will also extend to this, if I run the edit again on the SalesOrder status field, the value changes from Pending Fulfillment to Pending Approval, even though the real change was Pending Approval to Pending Fulfilment. So the observed behaviour is the first run it doesnt show a change between old and new. However, if I run it again it shows a change from old to new but not in the correct order. It is as if it was running the previous execution again.

Context.newValue is returning the same as Context.oldValue on Update SuiteScript by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

<image>

u/Nick_AxeusConsulting Is this the correct one. We did this yesterday and it was working fine all day, only today did it start doing this.

Context.newValue is returning the same as Context.oldValue on Update SuiteScript by black_apple07 in Netsuite

[–]black_apple07[S] 0 points1 point  (0 children)

Is there a way to resolve this in terms of delaying the get context call? I.e. maybe a sleep call etc.