Scripting

  • 1.  Anyone have an idea on why nSetKey() would not ret

    Posted 02-21-2017 15:51
    Anyone have an idea on why nSetKey() would not return any value. Snip of code: r = oss.nsetcompany(company) r = oSS.nSetModule(""S/O"") r = oSS.nSetProgram(oSS.nLookupTask(""SO_SalesOrder_UI"")) Set o = oScript.NewObject(""SO_SalesOrder_bus"", oSS) SalesOrderNo = ""0041969"" r = o.nSetKey(SalesOrderNo) When I look at the value for r it shows blank.


  • 2.  RE: Anyone have an idea on why nSetKey() would not ret

    Posted 02-21-2017 15:58
    Set module date?


  • 3.  RE: Anyone have an idea on why nSetKey() would not ret

    Posted 02-21-2017 16:01
    I don't think it required it to get the result but I had tried that too. No change. The code works on other systems but not the one I am on. I just expected either an error or a value but instead I get Blank.


  • 4.  RE: Anyone have an idea on why nSetKey() would not ret

    Posted 02-22-2017 09:42
    Turned out the reason was another script that was not checking for UI correctly. We changed the other script and ours worked as expected. Ours ran outside of Sage while the other script was a Table - Post-Read.