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)

Modify Mandatory property on existing Table field in extension

(0) ShareShare
ReportReport
Posted on by 1,683

Is there a way to to modify Mandatory property to No for an existing field in a extended table?

The property is disabled:

Mandatory.png

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Sukrut Parab Profile Picture
    71,739 Moderator on at

    You can not modify some properties on extensions. You may have to handle it through code if you don’t want to overlayered base table

  • Adrian Pascari A Profile Picture
    1,683 on at

    Do you have an example how to handle Mandatory propriety from the code?

  • Verified answer
    Sukrut Parab Profile Picture
    71,739 Moderator on at

    datesource_ds.object(fieldNum(datesource, RefItemId)).mandatory(false);// or true. You can do that on form event

  • Adrian Pascari A Profile Picture
    1,683 on at

    Need your help.

    Added form event(Initialized) and set mandatory property to false  :

    7536.Error.png

    But, on saving the record, the system shows a warning:

    7536.Error.png

    What else can I do to mark the field as non-mandatory?

  • Suggested answer
    Sukrut Parab Profile Picture
    71,739 Moderator on at

    You have done everything correct , there is nothing wrong in it . But one more thing I forgot to mention , if the property is mandatory at table level then its going to be difficult to change . If you really want to make it non mandatory I don't see any other option than changing it at table level

  • Percy Nxumalo Profile Picture
    115 on at

    Move your code to OnActivated.

  • Percy Nxumalo Profile Picture
    115 on at

    Move your code to OnActivated event handler.

  • Adrian Pascari A Profile Picture
    1,683 on at

    It doesn't work.

    The property is changed on form data source, but the error is returned by the table(on saving data to table).

  • jalali Profile Picture
    40 on at

    any solution ?

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 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans