Access PO_ReceiptReturnMatRqByPO

How can I access the table object PO_ReceiptReturnMatRqByPO? I need to delete a record from this table which refers to a ghost receipt and locks my PO.

There isn't a file with _bus or _svc, so using NewObject returns "NewObject Error 90".

When I go to the folder C:\Sage\Sage 100 Standard\MAS90\PO, I can't see this table. It only exists inside the companies folder like "MAS_ABX".
Does anyone know?
Parents
  • If you get this error in the UI when trying to access the PO, and you know there is not really a receipt open for it, then you can edit the table in Data File Display and Maintenance utility to remove the orphaned record.

  • in reply to hyanaga

    In the UI I know how to do it, the question is How to do it in scripting

  • in reply to tamir david

    I don't think it is possible to do directly using BOI... with data access happening indirectly through other business objects.

    Find what's causing your ghost entry, fix that, and you'll avoid the problem record.

  • in reply to tamir david

    I agree with Kevin.  Also, I don't think it's good practice to do it with script.  It could cause issues if a record is removed that shouldn't be removed.  This should not occur often, and if it is, the there is another underlying issue to uncover.

  • in reply to hyanaga

    This is the scenario. I'm trying to create a record for Receipt of Invoice. The keys are OK and record is created (after SetKeys() ). Now I'm trying to set the other fields (comment, amount, lines etc.). In my flow, in case there was a problem setting a value (for example comment longer from 30 characters, or Item without a GL attached to it), I want to cancel the new record and to delete it. So I delete the record and then I use DropObject for the object itself of PO_receipt_bus.

    The problem is that after that, the PO is still locked, because there is the orphaned record in ReceiptreturnMatRqByPO so I want to delete it also. It happens to me in version 2018 and 2019, but not 2020 and above

Reply
  • in reply to hyanaga

    This is the scenario. I'm trying to create a record for Receipt of Invoice. The keys are OK and record is created (after SetKeys() ). Now I'm trying to set the other fields (comment, amount, lines etc.). In my flow, in case there was a problem setting a value (for example comment longer from 30 characters, or Item without a GL attached to it), I want to cancel the new record and to delete it. So I delete the record and then I use DropObject for the object itself of PO_receipt_bus.

    The problem is that after that, the PO is still locked, because there is the orphaned record in ReceiptreturnMatRqByPO so I want to delete it also. It happens to me in version 2018 and 2019, but not 2020 and above

Children