I am migrating a customization from 9.05 to 10.1. The customization uses Epicor.MfgOpen4GL.DynamicAPI to update UD fields in a series of OrderRel records. While I’m fairly certain one cannot update the database directly from a customization in E10, I’m still looking for a strategy to achieve the same results.
I first attempted to use the update method of the OrderRelSearchImpl BO. I made the assumption that since the BO had an update method, I could update the fields. I end up getting an “update of order release not allowed” error message.
Does anyone have any recommendations? My next attempt is to use the SalesOrder BO, but I’m hoping to find something simple or similar to a quick update to the database.
You should NEVER update the DB directly in E10 or E9 or any version. Use the BO’s that’s what they are there for they ensure that your data is sound and that all the business logic is executed as it should. Simple isn’t better, trust me, it’s worth the effort to avoid major headaches.
You’re using the wrong BO to do that. Did you do a trace first? Maintaining data integrity is paramount in any ERP system, that’s why the BO logic is there. If it was easy to hack information in your database Epicor would employ a fleet of billable support people helping customers fix their broken system.
I believe there’s not much to trace. The customization is in the Sales Order Pick List report. It is a button that updates a UD checkbox on the release when the report is ran. This checkbox is then displayed on the release level in Order Entry to update the sales rep that the pick ticket has been printed.
The Sales Order BO would be the right way to go and isn’t that much code. Make the connection to the BO, do a getbyId to get the sales order, loop through the release records updating the check box and doing an update. As others have indicated using the BO is the safest. In E10 there is a lot less overhead as compared to E9 so speed isn’t the issue as it once was when tempted to do a direct DB update.
Thanks for the help James. I did end up settling on the Sales Order BO. I did have to make a small adjustment, as I have to update several releases that will span several orders. I was hoping to get this with one shot so I wasn’t looping writes to the database through a BO. I ended up using GetList or maybe GetRows, but I pretty much ended up using what you have suggested. Thanks for the confirmation.