Skip to main content

Notifications

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

How can I hide a row from Form Grid in x++?

(0) ShareShare
ReportReport
Posted on by 208
I have a form with multiple fields and one enum field. Now i want to hide the rows if the rows contains  specific enum value  e.g. /True/.I have tried it in my Forms data source active method but its hiding columns visibility.
any suggestions?
  • Martin Dráb Profile Picture
    Martin Dráb 230,900 Most Valuable Professional on at
    How can I hide a row from Form Grid in D365fo x++?
    If you always want to hide such records, apply the filter the filter just once, in data source's init() method.
     
    executeQuery() is run every time when the query executes, e.g. when a user sorts the grid. Executing the logic every time is unnecessary, and it may lead to bugs (when a new range is added every time, instead of keeping the single one).
  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    How can I hide a row from Form Grid in D365fo x++?
    Moving the thread to D365 FO forum - Next time you post please take care of it.
     
    Thanks,
    Girish S.
  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    How can I hide a row from Form Grid in D365fo x++?
    Hi Junaid,
     
    I think you want to filter the record based on the Enum value.
    In that case you need to add range to the executeQuery method of the form DataSource.
    You can refer to the below blog for adding Enum not equal to value in the query range.
     
    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,074 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,900 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans