Error 88: Invalid/Unknown property' on reference to a business object from within the same object

SOLVED

'Error 88: Invalid/Unknown property' on reference to a business object from within the same object
I am trying to browse the records in the 'SO_SalesOrderDetail' from within a Column Pre-Validate script on ItemCode in the same table'.
This works from a separate business object (e.g. SO_SalesOrder_bus), but I'm guessing there is a inability to do so from with the same object. Can someone confirm this?

oSO_SalesOrderDetail = oSession.GetObject("SO_SalesOrderDetail_svc") 'returns 100168
r = oScript.DebugPrint("oSO_SalesOrderDetail=" & oSO_SalesOrderDetail)

Set oSO_SalesOrderDetail = oSession.AsObject(oSO_SalesOrderDetail) 'Gets Error 88
r = oScript.DebugPrint("Set oSO_SalesOrderDetail=" & oSO_SalesOrderDetail) 


Parents
  • 0

    We just started getting this error within the last week or so on multiple button scripts that have been in service for years without issue. Sage 100 Adv 2020 (6.20.0.1). But it doesn't error on any specific line. It errors out at the start of the script. Pressing the button again allows the script to work without issue.

    This error occurs regardless where the script is set to run (both the server and client) and is highly inconsistent in the fact that first-clicks may not even generate an error. But so far it seems that once the error is displayed the script has always ran with a subsequent click.

    Viewing error detail shows 'Unable to run script'.

    While it's the same error, our cases don't really appear to be related. But I thought I'd share anyway just in case there is some other larger issue at work.

  • 0 in reply to SoonerFan21

    We need more details. Can you show the relevant code that led up to this error including the last method invoked?

  • +1 in reply to connex
    verified answer

    That's the problem. There are no methods invoked in my case. I could set a blank script to a button and it would still occasionally create this error at random. Some would go through and some won't - but those that don't will go through on a 2nd button click.

    The scripts are stored locally on the server running them so it can't be a network issue.

    It's almost like a file access permissions issue, but it's not. Even in the error screen the relevant script lines are displayed which shows that the server (from a server script) or the user (from a client script) both have permissions to read the file.

    In my case no portion of the script runs. The error occurs before ever reaching the first line.

Reply
  • +1 in reply to connex
    verified answer

    That's the problem. There are no methods invoked in my case. I could set a blank script to a button and it would still occasionally create this error at random. Some would go through and some won't - but those that don't will go through on a 2nd button click.

    The scripts are stored locally on the server running them so it can't be a network issue.

    It's almost like a file access permissions issue, but it's not. Even in the error screen the relevant script lines are displayed which shows that the server (from a server script) or the user (from a client script) both have permissions to read the file.

    In my case no portion of the script runs. The error occurs before ever reaching the first line.

Children