Sage 100

 View Only
  • 1.  Job Ops/ Operations Management and Error 88

    Posted 01-27-2022 17:58
    I am needing some help in figuring out an error 88 in Sales Order Entry with Operations Management installed

    I have a very basic custom office script that is on the totals tab.
    Part of the script is a using a simple Getvalue on a header field so it can be multiplied by a UDF field and then written to another UDFs.

    example:
    retval=oBusObj.GetValue("TaxableAmt",TaxableAmount)
    or
    retval=oBusObj.GetValue("UDF_PERMITS",Permits)
     
    The scripts work great on a normal Sales Order Entry (like ABC data).  ie No errors. I can even change the value of the UDFs.

    Now, when I am working on a company with Operation Management (aka Job Ops) V2021, I am getting strange results/ messages.

    When I enter a line item with a Work Ticket (WT), I am able to accept the Sales Order. The script has run at this point and all is good. (no errors)

    However, if I enter Work Ticket lines, and then try to change a UDF value that is a part of the script, I will get an error 88. 
    If I take that same Sales Order, enter Work Tickets and then completely close out of Sales Order Entry. I can go back in to the order and make the UDFs chances and everything is great again (no error 88)

    The error 88 only happens when I enter Work Ticket lines and change a value in the same Sales Order session.
    I have been able to drill down into the scripts and it errors out on the GetValue lines
    "Error 88, O/S Error:Object doesn't support this property or method: 'oBusObj.GetValue' (err/ret=2/0)
    Program Sy_Maint.pvc"

    It is almost like Sage/ Job Ops forgets what the getvalue command after a WT line has been entered and another field changed in that same session.

    I am mainly using post valuate on the UDF field, but have tried Pre-Totals and other possible execution points. 

    Any thoughts or suggestions would be appreciated.

    Thank you
    Michael

    #Custom Office Script
    #Job Ops

    ​​

    ------------------------------
    Michael Davis
    Warren Averett Technology Group
    Birmingham, AL
    ------------------------------


  • 2.  RE: Job Ops/ Operations Management and Error 88

    Posted 01-27-2022 18:29
    I've seen things like that with opening other objects (like getting data from the item / customer) and not closing the new object at the end of the script.
    If all you do is use oBusObj stuff, that's really odd.

    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 3.  RE: Job Ops/ Operations Management and Error 88

    Posted 01-28-2022 09:35
    Are you initializing the variables passed to GetValue with a default value to match their expected data type?  Like TaxableAmount = 0?  I can't tell based on the name alone whether or not UDF_PERMITS is a string or number but if number, then the first argument is fine and you would need to initialize the variable like Permits = 0 but if it is a string, the first argument should end with the dollar sign and the variable should be initialize like Permits = "".

    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------



  • 4.  RE: Job Ops/ Operations Management and Error 88

    Posted 01-28-2022 12:21
    Some things come to mind:
    1. Like David alluded to, is there a string UDF or string standard field you are doing a GetValue on who's var is not initialized to an empty string?
    2. Are you doing a GetObject to any UDT? If you added a UDT but then also added it to the menu, if used in the script, it requires script user access to it via Role Maintenance / Tasks / Custom Office / Misc Tasks
    3. If No 2 has been accounted for but you're still getting the error, try giving the script user access to all the UDTs in Role Maintenance, assuming there are multiple UDTs.


    ------------------------------
    Alnoor Cassim

    Email: alnoor@asifocus.com
    Ph: 949-689-9887
    Orange County, CA
    ------------------------------



  • 5.  RE: Job Ops/ Operations Management and Error 88

    Posted 01-28-2022 14:02

    As far I can tell, all my variables have been declared. I have them placed at the top of the scripts.

     

    Permits=0

    Cost_Per_Permit=0

    Total_Permits=0

    TaxableAmount=0

    NontTaxableAmount=0

    Freight=0

    UDF_SUBTOTAL=0

     

    The script is only using fields that are on the SO_Header table. Although, I do have a line on a script checking role permissions, but nothing to any UDTs.

    retUser = oSession.AsObject(oSession.Security).IsMember(sRole)

     

     

    The interesting thing to me is that if I enter a WT on the lines tab, and then go to the totals tab. The scripts have run (PreTotals currently). No errors

     

    If I enter a WT on the Lines tab, and then make a change on the UDF Permits field, it will error out (Post -Validate Change)

     

    Now if I enter data on the Lines tab and no WT lines (ie normal inventory or misc lines), the PreTotals script works. In addition, I can change the value on the UDF Permits and it will work.

     

    The only time I get error 88 is after I enter WT lines and make a change on the Sales Order in the same session.

     

    If I close out (Exit SO Completely) and go back into the Sales Order, all the scripts run.

     

    Thank you

    Michael

     

     

    Michael  H . Davis

    CPA.CITP, MCSE

    Senior Consultant

    Michael.Davis@warrenaverett.com

    (D) 

    205.313.4734

    (O) 

    205.313.4700   

    (F) 

    205.592.9991

    2500 Acton Road, Birmingham, AL 35243

    Ranked as one of the top managed service providers (MSP)
    and managed security service providers (MSSP) 
    in the world several years in a row. 

     

     

     

    To contact our Software Support Team call 844.712.6223 or email software@warrenaverett.com.
    To contact our Technical Services Team call 888.419.9090 or email resource.center@warrenaverett.com

    Warren Averett is celebrating 50 years of serving our community and clients. 
    Learn more about our history and where we're going in the future. 

     






  • 6.  RE: Job Ops/ Operations Management and Error 88

    Posted 01-28-2022 15:24
    I stopped using retUser = oSession.AsObject(oSession.Security).IsMember(sRole) after finding it didn't always work consistently or caused scripts to fail inconsistently.  Instead, I use retUser = oSession.IsMember(sRole).

    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------



  • 7.  RE: Job Ops/ Operations Management and Error 88

    Posted 01-28-2022 15:45
    Edited by Alnoor Cassim 01-28-2022 15:45
    Agree with David! A well known example is double-clicking an from the Orders tab in Customer Maintenance so that S/O Entry would open, would cause a SO Header script an Error 88 during isMember() checking. Good news is at some point in Sage code, IsMember() was added to Sy_Session.pvc so it no longer has to be called from the referenced child security object anymore. This means oSession.IsMember(sRole) is a much more direct and reliable way to check role access. Hopefully that solves it for you.

    ------------------------------
    Alnoor Cassim

    Email: alnoor@asifocus.com
    Ph: 949-689-9887
    Orange County, CA
    ------------------------------