Move custom field from sales table to whsshipment table

Hi Team,
I created some custom field in salestable ie Status and want to move this to whsshipmenttable when user click on “Release to wareshouse” in salesTable form.
Earlier we developed COC code in WhsWarehouseRelease class and extended the method “initShipmentForSalesOrder” but recently its stop working.
Even while debugging its not hitting the breakpoint at this method.

@MartinDrab please suggest

It might mean two things:

  • either initShipmentForSalesOrder() isn’t called
  • or you have a problem with debugging

Put a breakpoint to createShipments() method and check if it works there.

It seems to me that the only place in WhsWarehouseRelease class calling initShipmentForSalesOrder() method is createOrConsolidateShipmentForSalesOrder() method, which is obsolete - that may be the problem.

I think the logic is now in WHSShipmentCreatorSales class.

There could be several reasons why the COC code you developed earlier stopped working and why the breakpoint is not being hit. Here are a few things to consider:

  1. Check if the method you are trying to extend, i.e. “initShipmentForSalesOrder,” has been changed or moved in the codebase. If the method has been moved to a different class or module, your COC code may need to be updated accordingly.
  2. Verify that the COC code is still enabled in the system. It’s possible that the COC code was accidentally disabled or removed.
  3. Check the version of the application or framework you are working with. If there has been an update or upgrade, your COC code may need to be adjusted to work with the new version.
  4. Review the logs and error messages to see if there are any issues or conflicts that may be preventing the COC code from executing properly.
  5. Double-check the syntax and logic of your COC code to ensure that there are no errors or typos that may be causing issues.

Once you have identified the issue, you can update or modify your COC code accordingly. It’s also a good idea to test the code thoroughly before deploying it to a production environment.

1 Like