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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans