web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

In which method to hide form field

(0) ShareShare
ReportReport
Posted on by 506

I'm looking for the most logical method to hide a form field after the form datasource is available.

For info, the form is SalesTable.

I want to hide the field when opening from ListPage or when navigating between Sales orders using the record navigation at the bottom of forms.

For example, then I can check data value and hide the field.

if(SalesTable.ProjId)
{
    formCtrlName.isVisible(false);
}

I have the same question (0)
  • Verified answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    The correct place to trigger your logic is the active method of the SalesTable data source.

    However I suggest you to place your code in a separate method, and just call that method from the active method.

  • _MGP Profile Picture
    506 on at

    Thank you Nikolaos. I did what you said and it is working.

    Also, just to note that I needed to add the else as follows because when navigating through Sales orders using the record navigation otherwise it will always stay hidden after a Project Sales Order is displayed (unless form is closed and re-opened).

    if(SalesTable.ProjId)
    {
        formCtrlName.visible(false);
    }
    else
    {
        formCtrlName.visible(true);
    }

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans