Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

3417:21739 -- soitemJumpWomatl.script

omfgppc
2009-03-13
2013-03-08
  • omfgppc
    omfgppc
    2009-03-13

    brettbrown wrote: I haven''t been able to get this script to work.
    I modified it a little to get the button to display.
    Now it opens the wo materials screen correctly, but doesn''t  set the parameters.

    This is the code that sets the params, opens the new screen, and tries to open a particular wo_id.

      params = new Object;
      params.wo_id = qry.value(\"wo_id\");
      params.mode = \"edit\"

    var act = mainwindow.findChild(\"wo.maintainWoMaterialRequirements\");
      if(act != null)
      {
        act.trigger();
     
        var wnd = toolbox.lastWindow();
        wnd.set(params);

    With debugging messages, I verified that params.wo_id is set correctly,
    but the code fails on var wnd = toolbox.lastWindow();
    In 3.2.0 it crashes the client.
    In 3.2.1 it does nothing - the value of wnd is NULL -- Read more at http://www.xtuple.org/phpBB2/viewtopic.php?t=3417