Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Run-Time fixed dimension range on query prompt

(0) ShareShare
ReportReport
Posted on by 21
Hi,
 
When the form is opened, the query prompt opens.
Vendtrans has a defaultdimension field, to which the system automatically adds the range option name of /dimension./ at runtime.
I can select it manually at the prompt.
But, I would like to set it fixed when make the query in x++.
How can I do this?
 
I tried this suggestion:
Unfortunately, the lookup option did not work for this.
 
Thank you in advance for your help.
 
Regards,
László
  • Run-Time fixed dimension range on query prompt
    Hi,
     
    Yes, that's exactly what I want, to add a range to the query in the init method, which is only added by the processor at runtime.
    The "Dimension." selection in query is not yet available in init method. But I wonder if there is a trick for this.
     
    Regards,
    László
  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    Run-Time fixed dimension range on query prompt
    In that case have you tried adding the range in the init method of the form?
     
    Thanks,
    Girish S.
  • Run-Time fixed dimension range on query prompt
    Hi,
     
    The range must be included in the list, the value of the range must be modifiable by the user.
    In this case, ExecuteQuery does not run yet.
     
    Regards,
    László
  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    Run-Time fixed dimension range on query prompt
    Hi Horvath,
     
    You can add the range in the executeQuery method or if the form contains query you can add range there.
    Since its a default dimension field how would you identify each dimension values in the code? because the filter in the query prompt shows dimension with values like DefaultDimension.CostCenter, DefaultDimension.Department etc in the lookup.
    I am not sure on this, but you can refer to DefaultDimensionView and add that range to the table which will have values against each dimension values.
     
    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... 292,162 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans