Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Extension of a query d...
Finance forum
Unanswered

Extension of a query does not reflect in DP class

Posted on by 159
Hi everyone,
 
I'm extending query called TaxTrans, to added one more field ->
 
This query is being used in a DP class "TaxTransDP", some screenshot is like this :
 
 
in processReport method:
 
 
May I know is there something need to do right after adding that 1 field in the query, Build+Synchronize ? 
Since when I debug this, I can see the query is not with the additional field (TaxBaseAmount) ->
 
{Query TaxTrans object 470176b0: SELECT Source, SourceCurrencyCode, TaxCode, TransDate, Voucher, SUM(TaxAmount), SUM(SourceRegulateAmountCur), SUM(TaxInCostPriceMST) FROM TaxTrans(TaxTrans) GROUP BY TaxTrans.Source, TaxTrans.SourceCurrencyCode, TaxTrans.TaxCode, TaxTrans.TransDate, TaxTrans_W.VatDueDate_W, TaxTrans.Voucher ORDER BY TaxTrans.Voucher ASC, TaxTrans.TransDate ASC, TaxTrans_W.VatDueDate_W ASC, TaxTrans.SourceCurrencyCode ASC, TaxTrans.TaxCode ASC WHERE ((TransDate = {ts '2023-07-31 00:00:00.000'})) OUTER JOIN VatDueDate_W FROM TaxTrans_W(TaxTrans_W_1) ON TaxTrans.RecId = TaxTrans_W.TaxTrans}
 
This is why when I display this in my DP class extension, this field TaxTrans.TaxBaseAmount always zero.
 
May I know how to get this amount ?
 
Thanks
 
  • Martin Dráb Profile Picture
    Martin Dráb 225,862 Super User on at
    Extension of a query does not reflect in DP class
    The data provider class: TaxTransDP.
  • CU28051221-0 Profile Picture
    CU28051221-0 159 on at
    Extension of a query does not reflect in DP class
    Hi Martin,
     
    I'm sorry, "dynamicQuery" variable of what object if I may ask.
     
    Thanks.
  • Martin Dráb Profile Picture
    Martin Dráb 225,862 Super User on at
    Extension of a query does not reflect in DP class
    I suspect that it's still coming from last-used values, but anyway, debugging can tell you more about what happens.
     
    By the way, try setting dynamicQuery variable to null in an extension of processReport(), above next. It's not something you should keep there, but if it indeed makes a difference, it'll tell you what you should focus on.
  • CU28051221-0 Profile Picture
    CU28051221-0 159 on at
    Extension of a query does not reflect in DP class
    Hi Martin,
     
    Unfortunately, still persist after I delete my usage data.
     
    Thanks.
  • Martin Dráb Profile Picture
    Martin Dráb 225,862 Super User on at
    Extension of a query does not reflect in DP class
    My guess it that you're getting the query used in the previous run, which didn't have your changes. The purpose is allowing you to reuse parameters you've set up the last time. You can find the entry in usage data and delete it. You can also use the debugger to see whether my theory is correct.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,513 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,862 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans