Hi,
Here's an interesting issue I have recently run into. Hoping someone out there can shed some light on it.
I'm using Navision 4.0. I added a custom table and a custom form which creates functionality to produce a cover letter report. I utilized the codeunit Transfer Extended Text(378). I added custom functions to CU 378 to make it work, and it does.
So we have an add-on which allows a window to appear and word wrap comments for the client. This add-on also added custom functions to CU 378.
When I imported the add-on codeunit for the word wrap, the functions within this add-on codeunit contains calls to the Transfer Extended Text codeunit (378). It should be using it's own created functions in 378(I manually integrated), but instead the calls have been replaced with my custom functions in CU378. This is difficult for me to try and explain, so I'll try a short form:
378 - Transfer Extended Text - CodeUnit - Manually add functions for the word wrap. ie..InsertWordWraptoSalesLine
14005080 - Word Wrap - CodeUnit - Gets imported in.
When I look a the Word Wrap codeunit instead of it's original call:
TransferExtendedText.InsertWordWraptoSalesLine
It says TransferExtendedText.InsertCoverLetterLines (Which is my custom function in TransferExtendedText)
I don't understand how this happens. I have tried different orders to which I import the CU's. When I think it's working, my custom subform for the cover letter gets altered. Instead of calling TransferExtendedText.InsertCoverLetterLines it uses TransferExtendedText.InsertWordWraptoSalesLine.
No where in the import worksheet does it list the custom cover letter subform change. I found this while debugging.
I have got it to work, by manually testing everything. But when the time comes to import this to a clients live database, it will have to all be carefully integrated and some things will always have to manually be changed. Not to mention the fact that it all seems very unstable and a little unpredictable, who know what else got altered.
Any ideas why this happens?
Dneal
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
RIS Plus, LLC
MVP - Business Apps
If this the case, then I have to remove all my preexisting customized function calls every time I add new functions to a codeunit. Is there no way around this?
DNeal
You don't have to remove anything. Here's how I do it:
I have my source database open in one window, and the target database in another. I also have a code compare tool (I use Beyond Compare) open to compare the objects. If I see that the object in my target is missing a function, I open the source database and copy the function (open the globals, go to your functions tab, select the function and hit Ctrl+C), and paste it into the target database (open the same object, go to the functions tab in the globals and hit CTRL+V). The compiler should tell you if there's anything wrong.
If you run into the same issue every time you merge, you just have to renumber the functions in your source database and you should be set.
RIS Plus, LLC
MVP - Business Apps
Dneal
RIS Plus, LLC
MVP - Business Apps