xTuple.com xTupleU Blog & News Customer Support

Sales Order Cluster New ID trigger

In a screen - I’m trying to trigger a function off the salesorder cluster - using the following

var _assign = mywindow.findChild("_assign");
var _unassign = mywindow.findChild("_unassign");
var _salesorder = mywindow.findChild("_salesorder");
var _knllist = mywindow.findChild("_knllist");
var _assignedlist = mywindow.findChild("_assignedlist");
var _update = mywindow.findChild("_update");
var _unassignAll = mywindow.findChild("_unassignAll");
var _currentlist = mywindow.findChild("_currentlist");
var _link = mywindow.findChild("_link");

//toolbox.messageBox(“Test”, mainwindow, “test” ,“test”);

_salesorder[“newId(int)”].connect(coheadLink); <-- specifically this line here

function coheadLink()
var coheadparam = new Object;
coheadparam.coheadid = _salesorder.id();
cqry = toolbox.executeDbQuery(“northway”, “knlCoheadAssigned”, coheadparam);

Everything else currently works for it - including using the Update button to run the same function - but I would prefer it to trigger off a new Id selection to limit any potential operator errors. I’ve usedthe newId(int) trigger before without issue but never with a sales order cluster. Is it possible or does something else need to be done to get it to trigger?

The trigger needs to be: _salesorder[“newId(int, QString)”].connect(coheadLink);


Javier is correct. Just to clarify, the order cluster is used for several order types (S/O, P/O, and possibly W/O) so the int parameter gives you the ID, and the QString parameter gives you the order type (SO, PO etc)