How to populate Fixed Asset "FA Class Code" from FA Depreciation Book "FA Posting Group"

sjensjen Posts: 33Member
Hello, I am trying to populate Fixed Asset "FA Class Code" field from FA Depreciation Book "FA Posting Group" but I get a message when I run my report that "Depreciation Book Code" = value doesn't exist. I can read the FA no but couldn't figure out the "Depreciation Book Code"

Here my code
Fixed Asset - OnAfterGetRecord()
FADepBook.RESET;
FADepBook.SETRANGE("FA No.","Fixed Asset"."No.");
//FADepBook.SETRANGE("Depreciation Book Code",);
IF FADepBook.FINDFIRST THEN BEGIN 
  "Fixed Asset"."FA Class Code" := FADepBook."FA Posting Group";
  "Fixed Asset".MODIFY;
END;


FADepBook>> Record>> FA Depreciation Book

FA Depreciation Book PK
FA No.,Depreciation Book Code

Fixed Asset PK
No.

Thank you
Sign In or Register to comment.