ok even if it is just UD fields if I am understanding you correctly you are running a stored procedure from within a customization that is accessing the Back end directly from the Front End.
That is generally not a good idea, one option would be to run a BPM that then calls your stored procedure just throwing it out there
I should’ve said - can I run a BPM from a custom toolbar button? It doesn’t show up in trace log.
I haven’t seen a UBAQ defined or mentioned anywhere. OK I see it’s an Updateable BAQ. I don’t know enough yet to know the difference.
my objective:
Our accountants want to see the Project Costs broken down by labor types, material types.
Ideally when the user selects the ‘Build Project Analysis’ on the Project Entry form my process would run and update a bunch of ud fields which will be displayed on the Project Cost form.
I have it working via a custom toolbar button which executes a stored procedure.
BUT, if there is a ‘safer’, better way to do it I am open to suggestions. And LOTS of help because I have spent a lot of time on this - including having to completely start over at one point, and I do not know this C# yet.
UBAQ Updatable BAQ
And yes you can trigger a BPM from anywhere. On your toolbar click you just invoke the method which has the BPM attached to.
(or since you are in 10.2.500 you can instead trigger a function which is wayyyyy better than a UBAQ)
I initially was going down the path of using a data directive, but I couldn’t get past building all the queries in C# - lots of joining and grouping and summing - it was a mess. So I gave up on that. Can I call a stored procedure from a Data Directive? How do I do that?
I would highly recommend against the Stored Procedure like Jose says. Updating UD fields or tables is done all the time and people here can help you with it. Hiding SPs in your database makes it difficult for someone in the future to maintain the system if you’re out on vacation… Epicor can’t help you if you have issues with the system either.
I need calculated values for each of the fields in uploaded image, except Manual and Budget which are manually entered - by Project. I haven’t even gotten that far yet besides a couple basic actual labor hours type query which still involves multiple tables.
An Epicor Function looks exactly like at stored procedure - very compact. You can go with what you know and at least you are now aware of the risks of using a stored procedure.