xTuple.com xTupleU Blog & News Customer Support

PriceList Screen

I have a custom screen and script for Sales Order Items that calls the core PriceList screen.

I use the following code to call

var newdlg = toolbox.openWindow(“priceList”, this, Qt.WindowModal);
newdlg.set(params);
var result = newdlg.exec();

What I need on the return is the _selectedPrice property which is in the priceList.h code

trying this does not work

var selectedPrice = newdlg._selectedPrice;

I assume my problem is that the newdlg is a Dialog Class and I need the PriceList class.

Is there a way to get the _selectedPrice property in javaScript?

Thank you

Bob

To whom it may be of concern.
For this core screen priceList”, you cant grab the public properties but you can grab the _price Grid

So
var newdlg = toolbox.openWindow(“priceList”, this, Qt.WindowModal);
newdlg.set(params);
var result = newdlg.exec();

if ( result == 1)
{
var priceGrid = newdlg.findChild("_price");
var row = priceGrid.selectedItems();
var myRow = row[0];
var selectedPrice = myRow.text(“base_price”);
}

That seems to work…