Hello all still new to Epicor. I was working on BPM and keep seeing the ttCustomer or ttOrderHead when I search now how do call that? Is it something about the reference or library?
I always get CS0103 The name “ttOrderHead” does not exist in the current context.
this is all dependant on what version of the software you are on, as well as what business object your BPM is working with. the OrderHed record is not available everywhere. It should be in the SalesOrder business object.
BUT.. somewhere about 5 years ago, the development team switched things up, and converted the use of tt records to ds records… so instead of ttOrderHed, you may need to change it to dbOrderHed ds.OrderHed. (or something like that).. someone might need to correct me.
klincecum edit: Sorry Tim, didn’t see the strikethrough corrections
After v10.2 (so any Kinetic Version), you must use ds.OrderHed / ds.Customer in Method Directive BPMs. In Data Directives, ttOrderHed and ttCustomer still work, but you can use ds.OrderHed / ds.Customer, etc.
While this is correct. It is not always ds. You need to check the parameters of the method. I believe most get by ids and get rows etc use something like results.OrderHed.
In code best to right click and choose the parameters to get the correct parameter name.
I stand corrected, this is accurate. Usually in Save methods like SalesOrder.MasterUpdate or Customer.Update, you would use ds.. There are a lot of methods that retrieve a list, convert data, etc, that will return a dataset called results.
So, I feel like the OP is maybe asking a more basic question about what this actually is? If not, sorry, but I’m sure someone will find this useful.
ttTables are the (mostly) old way that epicor referred to “temporary tables” or the tables that are in memory being passed from the client to the server and back. Like previously stated, I believe data directives still use tt but method directives have moved mostly to ds.something.
How do you use this? So in a method directive BPM you have 2 common flavors. Pre processing, and Post Processing. With pre-processing, you have access to the dataset that is being passed from the client before it gets to the server code. So if you want to enforce some rule to make sure x=y you can either change it on the way, or if it doesn’t conform to what you need, do something like raise an exception which stops the method altogether. A majority of the time update methods are going to use pre-processing as you want rules enforced before you write changes to the database.
On the post processing side, this is after the server has done it’s work and is passing information back to the client. These would be most used when the client is requesting data from the server, like on a getlist, or onchange, where the server might be looking up your defaults, but you want to change those defaults that are showing on the screen for the user. You’re still going to manipulate the temporary object (tttable, or ds.something depending on where you are and what version you’re on) but this won’t affect what gets saved in the database on this specific call, because the server is already done with this data.
Like @BenWheeldon mentioned, if you right click in your code window, you will see “parameters” and it will show you want is available in the specific method that you are using. Once you get the basic object, then add “.” and Ctrl+Space to get an intellisense like list of available properties and methods that are available.
That’s a super short and generic answer to a very broad and more often then not -nuanced depending on what you are doing question, but I hope that helps.
I haven’t seen results in code (directives) but the iResult interface is a staple of ASP.NET and I see the result sets there. Of course, things are a changing and I’m always open to learn something new. The older I get, the more uneducated I feel.
So for example: Post-processing on SerialNo.GetSerialNumbersNotCompleted, which is the service called when you are picking Serial Numbers for a job operation, returns a list of serial number records in result.SerialNoList.