SophieGadrey
11/18/2021, 2:14 PMfunction IsNewOrder(orderId) {
s = search.create({
type: search.Type.SALES_ORDER,
filters: [search.createFilter ({
name:'otherrefnum',
operator: search.Operator.CONTAINS,
values: orderId})],
columns: ['otherrefnum']
}).run().getRange({
start: 0,
end: 10
});//should only be one
}
The filter seems to return the first line of all my list of record of Sales Order. It seems that the filter 'otherrefnum' doesn't match the parameter orderID that is a value I get by using getValue in a fieldChanged function. So I don't known why the search always return the first line of all my transaction and not the matching orderId.
Have you ever have this issue before ?
Thank you !battk
11/18/2021, 10:19 PMotherrefnum
is the PO/Check Number
filter in the uibattk
11/18/2021, 10:20 PMSophieGadrey
11/19/2021, 12:39 PMSophieGadrey
11/19/2021, 12:45 PMbattk
11/19/2021, 1:11 PMbattk
11/19/2021, 1:13 PMPO/Check Number
and PO/Check ID
filters work and the differences between the twoSophieGadrey
11/19/2021, 1:51 PMbattk
11/19/2021, 1:52 PMbattk
11/19/2021, 1:52 PMbattk
11/19/2021, 1:53 PMSophieGadrey
11/19/2021, 2:03 PMbattk
11/19/2021, 2:17 PMbattk
11/19/2021, 2:17 PMbattk
11/19/2021, 2:17 PMSophieGadrey
11/19/2021, 2:19 PMbattk
11/19/2021, 2:19 PMSophieGadrey
11/19/2021, 2:20 PMbattk
11/19/2021, 2:20 PMSophieGadrey
11/19/2021, 2:21 PM