web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Get 'Depreciation' value for selected asset from TmpDateSum

(0) ShareShare
ReportReport
Posted on by 2,114

Hi Techies,

I am developing a SSRS report to display year-wise fixed asset depreciation.

I need to fetch value from below form which can be navigated like - Fixed assets->Books->Profile. I need to get sum of 'Depreciation' for selected year(Date column) for each fixed asset. The table used behind is TmpDateSum

pastedimage1635406605395v1.png

I found it is used in AssetCardDP class, it's setting and retrieving the data as per my requirement.

pastedimage1635407937502v2.png

Whereas, when I try to use 'AssetInitDepreciationProfile::newFromBookDate(assetBook) in my DP class, it's giving error - It's protected method and can only called from methods in AssetInitiDepreciationProfile class.

Is there any other way by which I can fetch the Depreciation values or data from TmpDateSum.

Can anyone help if have developed/worked on this before.

Any response is appreciated.

Thank you in advance!

I have the same question (0)
  • Verified answer
    huijij Profile Picture
    19,811 on at

    Hi Sangram,

    This method of AssetInitDepreciationProfile::newFromBookDate(assetBook) is indeed modified by protect, why don't you create a new similar method to be called in the custom form?

  • Sangram Shinde Profile Picture
    2,114 on at

    Hi Judy,

    There are multiple different methods involved in this method which are again restricted to access.

    I found 'AssetDepreciationPlanDP' class where TmpDateSum table is populating. I am trying some code around to use it my report.

    Can you give any inputs in how can I use this class in my report.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Sangram,

    Please try using the Electronic Reporting functionality.

    A friend has designed a report for the exact same purpose and data that you describe.

    Things work out fine out of the box and you don't need to code a single line.

    Best regards,

    Ludwig

  • Sangram Shinde Profile Picture
    2,114 on at

    Thank you Dr. Ludwig, will check this part.

  • Sangram Shinde Profile Picture
    2,114 on at

    Thank you Judy, Dr. Ludwig for valuable suggestion. Below solution worked. Created extension of class and created new public methods where ever I was getting access errors, kept only what is required for my logic and it worked-

    Not sure why below rich formatting is not working.

    [ExtensionOf(classStr(AssetInitDepreciationProfile))]

    final class customAssetInitDepreciationProfile_Extension { public static AssetInitDepreciationProfile CustomNewFromBookDate( AssetBook _book, TransDate _maxPlanDate = maxDate(), System.Threading.CancellationToken _cancellationToken = System.Threading.CancellationToken::None) { AssetInitDepreciationProfile ret = new AssetInitDepreciationProfile(); ret.init(_book, _maxPlanDate, _cancellationToken); return ret; } public boolean customParmCalculateOnlyDepreciation(boolean _calculateOnlyDepreciation = calculateOnlyDepreciation) { calculateOnlyDepreciation = _calculateOnlyDepreciation; return calculateOnlyDepreciation; } }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans