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 :
Microsoft Dynamics AX (Archived)

opening a form on basis of menuitem

(0) ShareShare
ReportReport
Posted on by 950

I am making A student form and made menuitem similar to create customer  when i call the pop up form by 1st menuitem, i want to disable some fields which show only on student form not on create customer form

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    in MenuItem you can use the Parameters property to pass some text saying that this menu item is for 'Student'

    then in init() method of the form you can check if element.args() is having parm() as 'Student' then write code to disable the related field

    Please verify if this solves your requirements

  • Suggested answer
    Martin Dráb Profile Picture
    239,650 Most Valuable Professional on at

    Nitesh's answer is in the right direction, I would just use an enum parameter (set menu item properties EnumTypeParameter and EnumParameter, read values from element.args(),parmEnumType() and  element.args().parmEnum()).

    Then get a reference to your field through YourTable_ds.object(fieldNum(YourTable, YourField)) and set call visible(false).

  • Suggested answer
    Rob Hensley Profile Picture
    on at

    I would advise creating a new Base Enum with Customer and Student as your elements and then utilizing the EnumTypeParameter and EnumParameter properties of the menu item to drive your logic to disable fields instead of hard coding text in the Parameters property.

  • Rob Hensley Profile Picture
    on at

    Sorry for the double post, I didn't see Martin's post of the same answer. :)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
dserp Profile Picture

dserp 4

#2
dekion Profile Picture

dekion 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans