Kevin Carpenter
05/07/2021, 8:26 AMfilters[1] _=_
new
_nlobjSearchFilter_('customer', 'pricing', 'is', custId)
and then trying to access the price with
_if_ (_typeof_(results[i]._getValue_('onlinecustomerprice')) _!=_ 'undefined' ) {
_var_ onlineCustomerPrice _=_ results_[_i_].getValue(_'onlinecustomerprice'_)_;
}
However, it’s just getting the regular non-logged in price.
Any thoughts?battk
05/07/2021, 9:48 AMbattk
05/07/2021, 9:48 AMKevin Carpenter
05/07/2021, 12:14 PMpricinglevel
Kevin Carpenter
05/07/2021, 12:14 PMKevin Carpenter
05/07/2021, 12:14 PMsalespricehtml
to get the correct price on the detail pages currentlybattk
05/07/2021, 12:35 PMKevin Carpenter
05/07/2021, 2:29 PMbattk
05/08/2021, 4:41 AMbattk
05/08/2021, 4:42 AMPricing Item
and Item Pricing
related columns from a customer search to get information related to Item Pricingbattk
05/08/2021, 4:53 AMKevin Carpenter
05/08/2021, 7:15 AMKevin Carpenter
05/08/2021, 7:18 AMKevin Carpenter
05/08/2021, 7:18 AMbattk
05/08/2021, 7:19 AMbattk
05/08/2021, 7:19 AMbattk
05/08/2021, 7:19 AMbattk
05/08/2021, 7:19 AMbattk
05/08/2021, 7:20 AMKevin Carpenter
05/08/2021, 7:21 AMKevin Carpenter
05/08/2021, 7:22 AMvar itemID = request.getParameter('itemid');
var custId = request.getParameter('custid');
var stCallbackFunction = request.getParameter('callback');
//nlapiLogExecution('DEBUG', 'Item IDs sent to suitescript: ', JSON.stringify(itemID));
if (itemID == null) {
response.write('URL parameter required: itemid <br> optional parameter: callback');
return;
}
if (custId == null) {
response.write('Customer ID parameter required: custid');
return;
}
nlapiLogExecution('DEBUG', 'custId', custId);
nlapiLogExecution('DEBUG', 'ITEM ID query string:', itemID);
var filters = new Array();
filters[0] = new nlobjSearchFilter('internalid', null, 'anyof', itemID);
if (custId != 0) {
filters[1] = new nlobjSearchFilter('customer', 'pricing', 'is', custId) // Getting the prices for a particular customer
}
var columns = new Array();
columns[0] = new nlobjSearchColumn('itemid');
columns[1] = new nlobjSearchColumn('parent');
columns[2] = new nlobjSearchColumn('type');
columns[3] = new nlobjSearchColumn("custitem_upsell");
var searchresults = nlapiSearchRecord('item', null, filters, columns);
battk
05/08/2021, 7:24 AMbattk
05/08/2021, 7:24 AMKevin Carpenter
05/08/2021, 7:25 AMKevin Carpenter
05/08/2021, 7:25 AMfilters[1] _=_
new
_nlobjSearchFilter_('customer', 'pricing', 'is', custId)
battk
05/08/2021, 7:25 AMbattk
05/08/2021, 7:25 AMfilters[1] _=_
new
_nlobjSearchFilter_('customer', 'pricing', 'is', custId)
is a filter, not a columnbattk
05/08/2021, 7:26 AMbattk
05/08/2021, 7:26 AMKevin Carpenter
05/08/2021, 7:42 AMbattk
05/08/2021, 7:43 AMbattk
05/08/2021, 7:43 AMbattk
05/08/2021, 7:45 AM