Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Using control's property name in X++

Posted on by Microsoft Employee

Hi does we have the property name appearing in the AOT of a control say for example like Grid are same to be used in the X++?

Like,

Grid1.editable(true);

Likewise other properties like AllowEdit all appearing in the property list must be used using the same propert name in X++?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Using control's property name in X++

    okay André Arnaud de Calavon thanks.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,269 Super User 2024 Season 2 on at
    RE: Using control's property name in X++

    Hi Mahesh,

    If you have enabled the AutoDeclaration, you can read or also change values from some properties. You can see which options are available if you type the name of the control and then use the dot.  A list with possible commands will be shown.

    In this example you can use it in this way:

    Gridname.skip(true);

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Using control's property name in X++

    Hi Baber Owais, AutoDeclaration concept as per I know is used for the same name of the control as used in the name property for that control.

    But my question is the number of properties appearing in the property page of a control say Grid, We have to use the property name that are applicable to be used in the X++ code or required to be used in the X++ code has to be used with the same name?

    For example AllowEdit property of Grid Suppose if I want to this AllowEdit property in X++, I have to use this as  AllowEdit only know in X++?

    For example Gridname.AllowEdit(true);

    Likewise if I need to use some other property of Grid say Skip in X++ ,

    then I have to use the same name of the property know?

    like, GridName.skip=Yes;

    Likewise for all properties of any control?

  • Suggested answer
    syed baber Profile Picture
    syed baber 11,627 on at
    RE: Using control's property name in X++

    Hi Mahesh,

    The control's property name does not appear in AOT. You can change the property of a control in X++ by using the same name that is shown on the property page of a control. To use this in your code, you need to set the Auto declaration property to true as Palle mentioned.

    Please let me know if you have further queries in this regard.

    Thanks,

    Baber.

  • Suggested answer
    PA-22040759-0 Profile Picture
    PA-22040759-0 6,194 on at
    RE: Using control's property name in X++

    I think maybe the AutoDeclaration is the control property your are looking for!?

    From MSDN: "Defines whether the system can declare a member variable that has the same name as the control. "

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans