In the Records Browser for Item Fulfillments I see...
# suitescript
m
In the Records Browser for Item Fulfillments I see the field with the id of 'entity' and label of Customer. However, when creating a saved search in the NS UI, I don't see that as an option for Criteria, looking for it as Customer or Entity. On an Item Fulfillment record, in the Field Explorer, I can see that entity is set. So, when writing a script for this saved search, I just used 'entity' but I get an error on the getRange() or each() call on the results. So is that field not available at all for Saved Searches on IF records? If so, how are IF searched for by customers?
a
There's not search info in the record browser for Item Fulfillment you need to go to the Transaction entry to see search columns/filter options The field in question will be referenced as "Name" in the NS UI That said, using entity as the field id in a scripted search should be perfectly fine. I think you've misdiagnosed your error as being related to this name/entity/customer and you actually have a different issue entirely. We'd need to see the error message and the code that caused it to really help
m
Thank you. I'll try building it in the UI with Name and exporting that as a script and if I'm still messed up, I'll post the code
👍 1
b
in general you actually want the main line name instead of name
☝️ 1
name is the line level name while main line name is the name of the main line
they arent always the same thing
m
Name did the trick, and thanks for the main line name thing too. I thought it would be Customer or Entity. When I exported the saved search in the UI with the chrome extension, it brought it over as: ["name", "any of", "1234"] // where 1234 is the customer id and in my script I had entity in place of name and it didn't like that. So thanks!
🙌 1