Sage 100

 View Only
Expand all | Collapse all

Error 88 and UDS - In Sales Order Entry I have tw

Jeff Schwenk

Jeff Schwenk11-14-2012 18:41

Kate Krueger

Kate Krueger11-30-2012 13:08

Kate Krueger

Kate Krueger11-30-2012 13:08

  • 1.  Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-07-2012 07:38
      |   view attached
    Error 88 and UDS - In Sales Order Entry I have two scripts running at Pre-Totals. Most of the time they work without error, however I've found that if a user adds a new shipping address to an existing customer through Sales Order Entry, when they click on the totals tab, they get this error: Error 88, Object doesn't support this property or method: 'oBusObj.GetValue' Program = sy_maint.pvc and then the order is deleted. Both scripts seems to generate the error together or alone, right now I just have this one running at pre-totals: soTotal = 0 canApp = """" retVal = oBusObj.GetValue(""UDF_SO_TOTAL_2"",soTotal) retVal = oBusObj.GetValue(""UDF_CAN_APPROVE_SO$"",canApp) if soTotal < 15000 then retVal = oBusObj.SetValue(""UDF_APPROVED$"",""Y"")end if if soTotal > 15000 and canApp = ""N"" then retVal = oBusObj.SetValue(""UDF_APPROVED$"",""N"") end if Any help would be greatly appreciated!


  • 2.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-07-2012 08:24
    One of the strange things that I've noticed is that sometimes when you remove/change a script, that the compiled script (SO_SalesOrder_BUS.vbs) still fires. Can you review both the SO_SalesOrder and SO_SalesOrderDetail scripts in ..\MAS90\CM\SCRIPT\, and make sure that they are doing what you expect?


  • 3.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-07-2012 08:31
    Hi Aaron - didn't know that was there so thanks! But everything in the compiled file looks right. The logic I can't figure out is why it only does it when the user adds a new shipping address. Does that come into play somewhere on the totals tab or something? Mysteries.


  • 4.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-07-2012 08:38
    Right on. A common reason for me is the S/O Entry screen not being closed and restarted after a Change to script. When the screen loads the _bus.vbs is loaded at that time in memory. Re opening the screen refreshes it. In the meantime I bang my head trying to figure out why changes I made didn't execute.


  • 5.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-07-2012 08:40
    Does it matter if other users have the screen open? I've been closing and re-opening but I know others have it open.


  • 6.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-07-2012 08:49
    I think it's something else. Will try it myself when I get to a computer later, unless somebody comes up with it.


  • 7.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-07-2012 09:02
    Do you have another script running on or around the same event? The error referes to oBusObj.EditState. This property is not in your script above.


  • 8.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-07-2012 09:09
    I have a slew. That edit state error may be from an earlier try, here is a screen shot of the error I'm getting now. I've also attached the entire so_salesorder_vbs for some light reading.

    Attachment(s)

    txt
    SO_SalesOrder_vbs.txt   6 KB 1 version


  • 9.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-07-2012 23:49
    I tried to duplicate this in MAS 200 with both your PreToals events and with creating a new ShipTo (as described on the Community), but I couldn't. With your error on a SetValue, I'm not sure how you know on which PreTotals event the error occurs. Could this be failing on a SetValue in a SO Detail UDS? Also, your use of retVal in the first PreTotals event as a string and then in the next statement as a number with the SetValue looks suspect, but it doesn't fail on my system. I think you can drop the 'retVal = oSession.UserCode'.


  • 10.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-08-2012 03:31
    Have you run the Custom Office rebuild utilities, update panels & customizer log?


  • 11.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-08-2012 08:54
    I've run all the utilities and moved one of the scripts away from pre-totals. Right now this is the only script running at pre-totals: soTotal = 0 canApp = """" retVal = oBusObj.GetValue(""UDF_SO_TOTAL_2"",soTotal) retVal = oBusObj.GetValue(""UDF_CAN_APPROVE_SO$"",canApp) if soTotal < 15000.00 then retVal = oBusObj.SetValue(""UDF_APPROVED$"",""Y"") else if soTotal >14999.99 then retVal = oBusObj.SetValue(""UDF_APPROVED$"",""N"") end if Still gives me the error if I add a ship to address. @DanBurleson - Should I use a different thing than ""retVal"" for the string value?


  • 12.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-08-2012 09:04
    @KateKrueger: when scripting, I always use ""retVal"" for one purpose -- to get the returned value of the different methods in the script. Rather than use retVal for the string, create a new variable, initialize it as a string (ie Dim strValue: strValue = """"). On which line does your script err out?


  • 13.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-08-2012 09:07
    Hi Aaron, I'm not sure which line is failing. I haven't had to debug before and hadn't looked up how to do it yet.


  • 14.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-14-2012 12:27
    Debugging: 1. Go to ..\MAS90\Launcher\SOTA.INI and put a line in the [Config] that says ""DEBUG=1"" 2. Add debugging code to your script, ie: dbg = oScript.DebugPrint(""Attempting to get value for UDF_SO_TOTAL_2"") 3. Open the object that you are trying to debug. 4. Right click the title bar, and go to ""Debugging Environment > Program Trace Window"" Anything that you put in the DebugPrint method will print in the Trace window. If I were debugging your script, I'd probably put something prior to runnint each GetValue and SetValue call. Sorry I missed this. If you tag comments with my name (ie @AaronClark), they'll hit my email and I'll see them sooner.


  • 15.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-14-2012 15:49
    @AaronClark - Thanks for these instructions! With @DanBurleson 's help, I was able to determine that the script was actually erroring out because of another script that was running right before it (which of course, the error didn't indicate in any way). I had a security script that I had to tell not to run on new records and the error stopped. Just in case this helps anyone else!


  • 16.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-14-2012 18:41
    Thanks for closing the case for us.


  • 17.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-30-2012 12:57
    @KateKrueger What version of MAS was this? I see another use is having a similar problem on the install of 4.5. It involves a security script running just befor the 88 and it didn't happen before on 4.4.


  • 18.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-30-2012 13:08
    MAS 200!


  • 19.  RE: Error 88 and UDS - In Sales Order Entry I have tw

    Posted 11-30-2012 13:08
    This was version 4.5.4.0