Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

How to look into a TempTable while debugging ?

(0) ShareShare
ReportReport
Posted on by 592
Hi guys,
 
How to look or query a table while debugging but it is a TempTable from D365 FO ?
 
Like this one, I'm debugging Tax process ->
 
I want to see what inside tmpTaxRegulationDetail which a variable from TmpTaxRegulation.
 
Thanks,
  • Voltes Profile Picture
    Voltes 592 on at
    How to look into a TempTable while debugging ?
    Yes, that is what I'm trying to do.
     
    It all started when I'm want to adjust my tax using this code :
     
    1.
     
     
     
    Upon trace this, I found something not right, especially because I'm using TaxRegulationDetail, which the trace is something like :
     
    2.
       
     
        
     
    Up to here I can see that the TaxRegulation is exists and it will be updated using the update() method.
    And the TaxAdjustmentType is Detail, as what I'm using as well in the 1st place.
     
    3.  After the update, it will follow by this, which is the following of the super() at point no 2  
         
         
      
        This will again choose the "false" condition of IF condition, since the TaxAdjustmentType is Detail
     
    4.  But after this point, when it is call that method (addTaxRegulationDetailToSummary() ->
       
        
     
        At first, the parameter _detailTmpTaxRegulation has its value, but after the 1st select, this _detailTmpTaxRegulation all will be null. I'm wondering why in the selection have the condition of RecId, but the point is at the pointer, this _detailTmpTaxRegulation having no value, as well as the tmpTaxRegulationDetail variable is null.
     
    This will be resulting the 2nd select also null, as well the 3 variable is null. Means even if the IF condition is not failed, there is nothing to update anyway.
     
    Thanks,
           
     
     
     
     
     
  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    How to look into a TempTable while debugging ?
    In that case you need to find out where the record gets inserted into the TmpTaxRegulation table. Since it's an InMemory table record will be inserted into the table somewhere inside the class or its related class.
     
    Thanks,
    Girish S.
  • Voltes Profile Picture
    Voltes 592 on at
    How to look into a TempTable while debugging ?
    Hi Girish,
     
    Yes, I think so too, it is data issue so that's why I want to see what inside that TmpTaxRegulation.
     
    And, yes, the IF condition is failing, which supposed not.
     
    Thanks
  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    How to look into a TempTable while debugging ?
    If the 2nd select statement is not returning anything, then it must be related to data issue.
    On the argument you have _detailTmpTaxRegulation - Based on that only tmpTaxRegulation select statement is added.
    So, you are saying the if condition is failing?
     
    Thanks,
    Girish S.
  • Voltes Profile Picture
    Voltes 592 on at
    How to look into a TempTable while debugging ?
    Hi Girish,
     
    I'm sorry, I think the image is not in full and not reflected what I want to find.
    The intention is actually I want to know why the selection is not return any value, when I expected it will.
     
    I understood about to highlight it, but that's is the point, when I looked at the variable, all empty while I thought will have records. So basically I want to take a look first what are inside that TempTable.
     
     
    As for my real intention is for this code (same image but full)
     
    Now I realize the selection no 1, is supposed to have no record but the amount in SUM.
    But selection no 2, I expected to have record. So again I want to know why the selection failed (which my thinking is I need to see what inside the table that make it return no record at all)
     
    Thanks,
     
  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    How to look into a TempTable while debugging ?
    Hi Voltes,
     
    Have you right clicked the variable and click on Add watch window?
    I think since it's a global variable it won't show the buffer values when hoover over the buffer. It will show the buffer does not exist in the current context.
     
    Thanks,
    Girish S.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans