Hi all, We are running a transaction saved search ...
# suitescript
s
Hi all, We are running a transaction saved search for item fulfilment and item receipt records. But in the results, the first line item on the item fulfillments is coming as the mainline whereas we are seeing correct result for item receipts (no line item is coming as mainline). Due to this, we are not able to use the mainline filter properly on our search. Any ideas on the different behaviour for item fulfillment records and how should we search so that we can only get unique fulfillment and receipt lines. Thanks in advance!
s
Did you try to just set mainline = F?
s
Yes @Sandii, when we setting mainline = F then the first line item of the fulfilment is not even coming in the result
When we remove the mainline filter and add mainline as column, then against the first line we are getting mainline as true for fulfilment. While for item receipt, its coming expected as false for all the lines
s
just ideas, line sequence number not equal to 0?
s
yes @Sciuridae54696d, it is coming as 0
b
usually you worry less about the mainline and more about the number of rows per fulfillment line
s
we want to add the mainline=F filter to make sure that we don't get any extra item receipt lines due to mainline, but that is removing the first line item from the fulfillment. we are seeing this behaviour for the first time. so we are not sure if we leave out the mainline=F filter, then we would always get the correct results for item receipts as well
b
the traditional way to filter out the extra lines on the item fulfillment is to add the cogs line filter
it doesnt work for all types of fulfillments, so i favor the applied to transaction filter instead. Only one of the search results will have the applied to transaction filled in
although not really why i do it, applied to transaction should also work for the item receipt
though the more normal solution is to use a filter expression so that you can use the OR operator to have different filters for item fulfillments and item receipts
s
Hi @battk are you suggesting something like this?
Also, unable to understand what exactly can we do using the applied to transaction filter. We tried to add it but it is coming on all line items for both item fulfillment and item receipts
b
you need to learn how to get unique lines from an item fulfillment search before doing your task
make an item fulfillment search first and learn how to get the unique lines before continuing on your current task
i offered two different solutions you could try
one uses the cogs filter, the other uses the applied to transaction filter
pick whichever one works best for you, i would not try using both
s
Hi @battk, thanks. We went with the conditional filters and tested it. Wanted to share the filters here as well once, can you please take a loot at the screenshot once and check if it looks fine to you
b
looks okay
i dont know what the last formula criteria adds
nor why it has to be a formula