Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Class extension of Dat...
Finance forum

Class extension of Data Contract class D365

(0) ShareShare
ReportReport
Posted on by 6,125

Hi,

Can some one please help me to create Class extension of Data Contract class. i can easily create extension of normal class but when ever i am trying to put annotation of data member attribute compiler give me error.

  • Suggested answer
    Eugen Glasow Profile Picture
    6,357 on at
    RE: Class extension of Data Contract class D365

    This has become possible: erconsult.eu/.../

  • babalalex Profile Picture
    411 on at
    RE: Class extension of Data Contract class D365

    Hi Martin,

    I am also looking for the possibility of adding an extra parameter in standard report.

    As per the previous posts, I could infer that its not feasible to add manual parameter in the standard report.

    Do we have any other way for this ?

    Thanks.

  • Martin Dráb Profile Picture
    233,066 Most Valuable Professional on at
    RE: Class extension of Data Contract class D365

    Yes, I know, but I was answering your subsequent question ("its necessary to put [DataMemberAttribute] at the top of the class when we are using this as contract?").

    I thought your original question was already addressed by Ievgen; I've made no research on it myself.

  • Sheikh Sohail Profile Picture
    6,125 on at
    RE: Class extension of Data Contract class D365

    Martin, Actually what i want to achieve to create an extension of data contract class for my API service. can you please confirm me is it possible or not? i was following your blog for normal class extension  

  • Martin Dráb Profile Picture
    233,066 Most Valuable Professional on at
    RE: Class extension of Data Contract class D365

    You declare a class as a data contract by these attributes. If you don't use them, the class isn't a data contract.

    But you must use DataContractAttribute, not DataMemberAttribute, at class level.

  • Sheikh Sohail Profile Picture
    6,125 on at
    RE: Class extension of Data Contract class D365

    Can you please confirm me one thing. its necessary to put [DataMemberAttribute] at the top of the class when we are using this as contract in web service D365

  • Verified answer
    Mea_ Profile Picture
    60,278 on at
    RE: Class extension of Data Contract class D365

    Hi Sheikh Sohail Hussain,

    As far as I know it is not possible. If you want to extend report to add new parameters you can extend menu item\print management to use new controller class that can use new DP and new contract class (they can be derived from standard if you want).

    Please refer for details docs.microsoft.com/.../custom-designs-business-docs

    docs.microsoft.com/.../extend-report-menu-items

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,467 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,066 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans