hi everyone, do you have an idea on how to achieve the following?
1. populate a journal line variable
2. populate its tracking line(s) and dimensions tables
3. post the journal line
Now, it seems to be a straightforward procedure, but there are 2 catches:
a. i don't want to create a real journal line (i don't want to insert it, i just want to populate a variable as codeunit 80 do, or at least create the journal in a temporary variable). This have to be done for performance and concurrency issues.
b. the tracking lines can be more than one, so, where should i put them? in a temporary variable?if so, will my process be able to read them during the posting of my item journal?
I'm doing some research by myself through standard codeunits, but the tracking module is crappy and i hope someone already figured out how to achieve the same request i have to do. Thanks in advance.
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog0
Comments
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
In order to not insert the actual table, you will need to modify CU 22 and create a new function to pass the temporary tracking lines. Then change SetupSplitJnlLine to get the records from your temporary variable instead of the actual table.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
this sucks...i have to create the tracking spec manually...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
but i cannot use that function to create a temporary tracking line, because the CreateEntry creates a REAL Reservation Entry Line. but you gave me a nasty idea...I can condition the INSERT instruction based on a parameter and then create a function to get back the value of the reservation entry in the codeunit.
After that, it's a straightforward TRANSFERFIELDS on my temporary item tracking line...I'll try it and post the code (I have some concerns about the fact that there are some linked tables, maybe)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
And i think this can make my day, too (I think I can go home after 2 hrs working )
It's not the most clean way to do it, but it's the simpler...but to be honest, I wonder who can be that "clean" when modifying the item tracking module...there's some parameter handshaking between my process --> codeunit "create reserv. entry" --> my process --> codeunit 22
but it appears to post it fine! I'm it, I'll blog about it ASAP
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n