Hi Experts,
How do I add for example Disposed Of field from a FA Line to include in to Fixed Asset List. Disposed is Global variable and doesn't exist in the FA Depreciation Books/Fixed Asset table. It is works when the filed exist in a table. Please assist where can I get similar C/AL function to perform the action.
Fixed Asset. Get(Fixed Asset."Disposed Of");
In page what would be the C/AL function?
Thank you
*This post is locked for comments
Dispose field value is based on the Disposal Date of the FA Depreciation Book, if it has a value it is set to true or else false, so you can create a flow field on Fixed Asset table to lookup Disposal Date to display date and then use that value to set a variable on the Fixed Asset Page just like on the other page or you could write the function as Amol suggested which will calculate the value based on FA Depreciation Book Disposal date.
Define gvFADepr Record FA Depreciation Book
gvFADepr.RESET;
gvFADepr.SETRANGE(gvFADepr."FA No.","No.");
IF gvFADepr.FINDFIRST THEN BEGIN
Disposed := gvFADepr."Disposal Date" > 0D;
END;
Write following code on OnAfterGetRecord on Fixed Asset List Page
Display 'Disposed' on Page.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156