How can I get the posting Date from the Posted Invoice form (Purchase Header) to Fixed Asset form (specifically to the subform and display the value in the Depreciation Start Date).
I have tried following the code using the debugger and tried to step through it, but I gave up when the Debugger crashed in the middle (after I had been debugging it for about 75 minutes).
Is there an easier way of doing this. It is bring in the Book Value in the subform after it is done posting it, I just cant seem to find the exact location where it is doing that. Once I know where that is happening I can then figure out a way of setting the Posting Date to the Depreciation Start Date field.
Does anyone have a better way of bringing in the Posting Date from the Purchase Invoice to Fixed Asset subform? or what codeunit is used to calculate the Book value field in the Fixed Asset form (FA depreciation subform)???
0
Comments
ArcherPoint, Inc http://www.archerpoint.com
Blog: http://www.navisionworld.com
skkulla
In general case "FA Posting Date" & "Posting Date" are same.
This should have done the trick, but it doesnt bring in the value. So i tried debugging it, and FALedgerEntry has the appropriate value but its not assigning it to the FADeprBook. Any Idea why. I thought it wasnt updating the table..so i tried: FADeprBook.Modify, but that just throws an error.
I am pretty sure I am doing something very retarded.
******I think I messed it up. I was trying something out and now I am getting this error message in the codeunit that was working perfectly fine before: The record valriable must belong to 5621 and not to 5601.
I deleted all the experimental code that I wrote, and still its giving me this message.****
UPDATE:- I couldnt resolve that error issue and didnt really want to waste any more time on the error message. Before doing any of the changes, I made a backup. So I just replaced the file with the backup.
please do not modify NAV to "automate" that the posting date of the Fixed Assets Purchase order is copied into the start date of the depreciation period. It is easier and cheaper to instruct the user how to find that date and manually type it in. You can add a "posted purchase line" list form on one of the buttons, filtered to PO Line Type to "Fixed Asset" and to Depreciation Book Code to the FA Depreciation Book Code. But you can also just point the user to Form 7185 and teach them how to filter.
But the way you were doing it in codeunit 5632 would change the Depreciation Start date each time a FALedgEntry was posted.
Please be careful making modifications like this.
Thanks,
Willy