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, ...
Suggested Answer

SysClientCacheDataMethodAttribute vs SysClientCacheDataMethod

(0) ShareShare
ReportReport
Posted on by 4,131

Hi,

If I would like to cache the display method in D365, should I use [SysClientCacheDataMethodAttribute(true)] or [SysClientCacheDataMethod(true)]? What is the difference between these two?

Thanks,

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Yuji,

    You should use [SysClientCacheDataMethodAttribute(true)] for caching.

    I am not sure about the other attribute ([SysClientCacheDataMethod(true)]).

  • Suggested answer
    Martin Dráb Profile Picture
    238,000 Most Valuable Professional on at

    It's the same thing.

    When you're decorating something with an attribute, you can either provide the whole class name (SysClientCacheDataMethodAttribute) or you can omit 'Attribute' at the end (SysClientCacheDataMethod).

  • Blue Wang Profile Picture
    on at

    Hi Yuji,

    They can all implement the cache the display method.

    You can first look at the description of these methods:http://kashperuk.blogspot.com/2015/05/tutorial-caching-display-methods.html

    For SysClientCacheDataMethod, But there is no information about the new SysClientCacheDataMethod attribute which should be used instead of cacheAddMethod on the form. Form this:https://github.com/MicrosoftDocs/dynamics-365-unified-operations-public/issues/2116

    (I am not sure about it)

    But I found that when I received the following BP "BPCheckDisplayMethodCached: Display method methodName on control LineAmount in form FormName not cached", I set the Cache Data Method property at the form control level to Yes.
    And add the attribute [SysClientCacheDataMethod on the table method, it also works normally.

    108.png

    [SysClientCacheDataMethod]
    public display LineAmount lineAmount()
    {
       return CurrencyExchangeHelper::amount(this.Price * this.QtyInstructNow, this.CurrencyCode);
    }

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
Abhilash Warrier Profile Picture

Abhilash Warrier 677 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 317 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans