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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Business Central || Query regarding show hide fields from an option set field

(0) ShareShare
ReportReport
Posted on by 2,122

Hi everyone,

We have a requirement from the client where he wants to insert a new option field on Sales order page under Shipping and Billing tab titled as "Inform To" . This particular field should act exactly like Ship-to field with options like Default, Alternate Shipping and Custom Address. The fields should show the other sets of fields according to the option selected. For example, if a user selects Custom Address option from the "Inform To" field then10 fields should be visible i.e. Name, Address, Email etc.

pastedimage1624029022369v1.png

We already created a Custom Option set field "Inform To". How can we show and hide the fields from our end using AL code?

Can anybody advise which is the best way to implement show and hide fields for the "Inform To" field in AL code?

Thanks in Advance

  • Suggested answer
    Andy Sather Profile Picture
    Microsoft Employee on at

    Hello - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    Additionally, there are many resources for learning that you can use.

    docs.microsoft.com/.../readiness-learning-developers

    Finally, if you require customized support for developing an Extension, there are specialized partner offerings:

    docs.microsoft.com/.../readiness-ready-to-go

    Please let me know if you have any questions on the above information.

  • Suggested answer
    JAngle Profile Picture
    159 on at

    Create a Boolean variable that is globally available on the page. In the OnAfterGetRecord trigger of the page and the OnValidate trigger of the field set a call to a local procedure which calculates the result of the Boolean variable. In the procedure use a case statement to determine the Boolean result.

    case InformTo of

       InformTo::"Option 1":

              VarVisibility: = ReturnVisibility(InformTo);

        InformTo::”Option 2”:

              VarVisibility: = ReturnVisibility(InformTo);

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 741 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 514 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 336 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans