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 :
Dynamics 365 Community / Forums / Finance forum / I want to extend the m...
Finance forum

I want to extend the method and add the condition of Query

(0) ShareShare
ReportReport
Posted on by

The PurchReceiptsListDP.printInventTrans () method has the following SQL description.

while select inventTrans
        order by StatusReceipt, InventDimId
where inventTrans.StatusReceipt     == StatusReceipt::Ordered
    && inventTrans.StatusIssue   == StatusIssue::None
join localInventDim
    where localInventDim.InventDimId == inventTrans.InventDimId
exists join localInventTransOrigin
    where localInventTransOrigin.InventTransId  == ventReceiptsListTrans.InventTransId
    &&  inventTrans.InventTransOrigin       == localInventTransOrigin.RecId


 inventTrans.StatusReceipt     == StatusReceipt::Ordered

to

(inventTrans.StatusReceipt     == StatusReceipt::Ordered ||
    inventTrans.StatusReceipt     == StatusReceipt::Registered)

How can this be realized with the Extension of Method?

  • Suggested answer
    Martin Dráb Profile Picture
    240,866 Most Valuable Professional on at

    Extensions don't allow modifications of existing code. You'll have to find another technical design to achieve your business requirement.

  • Suggested answer
    Sukrut Parab Profile Picture
    71,741 Moderator on at

    If you see code this method is called from setPurchReceiptsListDetailsTmp method which is called from  createData method  and it is public, you can use COC on the  createdata method , call standard method first and  then write your custom code to update records in temp table according to your need

  • Nobuaki Baba Profile Picture
    on at

    Thank you, Parab.I will try it.

  • Mariano Gracia Profile Picture
    on at

    With PU22 you can use SysDa API:

    https://blogs.msdn.microsoft.com/mfp/2018/12/06/sysda-a-new-x-query-api/

    it allows you to modify the x++ select statement using extensions

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 > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans