Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Business Central forum

Visible Property issue in sales order subpage based on conditon.

(0) ShareShare
ReportReport
Posted on by 80

Based on type i.e. Item, GL Account we have written a code to hide certain field. 

We also have written CurrPage.update();

This is working fine, but issues comes up when we try to move to next or previous record, a message comes up and ask, Do you want rename the record (Y/N) ? If we click No nothing happens means the dialog window remain there no matter how many times you click No. But if you click yes then the windows gone.

Second if we try to use the copy functionality and choose a document and click OK, the document is copied, but if we click on next line, an error pops says there is an error and the page will close with document no.

This is on SaaS version, have not tried on On-Prem.

Categories:
  • Suggested answer
    Peter Zentner Profile Picture
    390 on at
    RE: Visible Property issue in sales order subpage based on conditon.

    The visibility of a control/field cannot be changed after the page is open. You would have to use Editable or Enabled, which you can change dynamically. You can hide fields in the OnOpenPage, but this won't help you, since you do want to make the change based on certain record values. So, you will just have to mark those fields enabled = false, for instance.

  • Suggested answer
    Suresh Kulla Profile Picture
    47,499 on at
    RE: Visible Property issue in sales order subpage based on conditon.

    Can you try adding only on the OnAfterGetRecord page, but not on the ONValidate.

  • ManishS Profile Picture
    80 on at
    RE: Visible Property issue in sales order subpage based on conditon.

    OnAfterGetRecord and No. - OnValidate()

    But if i don't use the next & previous then there is not issue and it works fine.

  • Suggested answer
    Suresh Kulla Profile Picture
    47,499 on at
    RE: Visible Property issue in sales order subpage based on conditon.

    On which trigger did you add the CurrPage.Update statement? I don't think you can control the visibility of a control dynamically, you can control the edit or enable.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,469 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,066 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans