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

calling display method contributionMargin() does not return any value

(0) ShareShare
ReportReport
Posted on by

Hi everybody!
I am trying to call a display method contributionMargin() from a CustInvoiceTrans table so when i select all the fields from the table the display method returns a value. 
I don't want to select all the custInvoiceTrans fields for performance reason so when I select certain fields it does not return any value. 

so which fields that are related to this display method so if i call it the method can return a value?

  • Verified answer
    Martin Dráb Profile Picture
    240,930 Most Valuable Professional on at

    It seems that you didn't select all fields that the method needs. You can use the debugger to find out where the calculation fails, if you can't find it by just by looking at code.

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    It seems that it is a standard method otherwise you would created that. So first I would suggest you to create a custom display method on that table with only fields you require. And to verify if data is coming or no try firing a SQL query. If it's working fine in SQL, try debugging the code by writing a runnable job.

  • 365 financial Profile Picture
    on at

    thank u Martin..

    by using the debugger i found these fields that are required for the display method contributionMargin() to run successfully

    SalesId

    invoiceId

    invoiceDate

    NumberSequenceGroup

    StockedProduct

    InventTransId

    SalesCategory

    InventDimId

    Qty

    SalesUnit

    CurrencyCode

    ItemId

    LineAmount

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 555 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 484 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 378

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans