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

Announcements

No record found.

News and Announcements icon
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,120

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 (1)
  • 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,120 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,120 on at

    Thank you Dr. Ludwig, will check this part.

  • Sangram Shinde Profile Picture
    2,120 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 608

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 591 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans