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)
Suggested Answer

setting control mandatory

(0) ShareShare
ReportReport
Posted on by

i'm having a issue i have set the control mandatory on through active() but the problem is when open the form it does not show me red line that shows it is set as mandatory but when i click on control then it show me the red line in the control......

anyone please suggest me what should i do to set control mandatory when i open the form

*This post is locked for comments

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

    thanks for reply sukrut...

    controls are in condition that is why is have used active method, and i have to set controls mandatory not line, i said that on setting control mandatory a red line appears but it does'nt the red line appears when i click the controls

  • Community Member Profile Picture
    on at

    i'm on different client i'll share my code later if you don't mind....excuse for my delay

  • Community Member Profile Picture
    on at

    public int active()

    {

    if(table.formulaId == "1")

    {

     formulasheet1.enables(true);

     formulasheet2.enables(false);

     formulasheet3.enables(false);

     itemId.mandatory(true);

     inventSiteId.mandatory(true);

    }

    and so on for different formulaId

    }

    suggest me what should i do

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    Please try with the following statement and when you say on opening the form, does the control/field have data in it. If so, it's the expected behavior.

    DatasourceName_ds.object(fieldNum(TableName, inventSiteId)).mandatory(true);
    DatasourceName_ds.object(fieldNum(TableName, ItemId)).mandatory(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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Pratik Bhosle Profile Picture

Pratik Bhosle 2

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans