erictgrubaugh
02/28/2019, 6:20 PMCaleb Fong
02/28/2019, 7:10 PMerictgrubaugh
02/28/2019, 7:10 PMCaleb Fong
02/28/2019, 7:12 PMCaleb Fong
02/28/2019, 7:14 PMfunction find_Orders() {
nsLog.audit({ title: "Looking up Records" });
var the_date = "02/26/2019"; //the value from the form field -- currently hard set so there are results to display
// This will generate the search
var order_search = nsSearch
.create({
type: nsSearch.Type.SALES_ORDER,
columns: [
{
name: "trandate"
},
{
name: "closedate",
function: "ageInDays", // this funcition gives a numeric result (as in 5) instead of a MM/DD/YYYY
sort: nsSearch.Sort.DESC
},
{
name: "tranid"
},
{
name: "entity"
}
],
filters: [
{
name: "mainline",
operator: "is",
values: ["T"]
},
{
name: "type",
operator: "anyof",
values: ["SalesOrd"]
},
{
name: "trandate",
operator: "on",
values: [the_date]
},
{
name: "closedate",
operator: "isnotempty"
},
{
name: "trackingnumber",
operator: "isnotempty"
}
]
})
.run().getRange({ start: 0, end: 1000 });
// nsLog.debug({title: "", details: order_search});
return order_search;
}
erictgrubaugh
02/28/2019, 7:24 PM