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)

modified field value method

(0) ShareShare
ReportReport
Posted on by 327

hi i am new to AX i want to do some task ill share my requirement any one pls help me how to do.

i have to tables emp parent and emp child.emp parent consist 2 feilds thats is id and name.

emp child consist id,name and location.

emp parent:

id  name

1     A

2      B

emp cheild:

id   name location

these are the feilds and data in tables.now in emp child ill put dropdown for id that id i can get from emp parent using normal relation.suppose in drop down(emp cheild table feild is id) if i select 1 the name A has to automatically for that which method i have to write any suggestions pls......tnk u 

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,156 Super User 2025 Season 2 on at

    Hi Karthik,

    Can you rephrase your last part of the question? It is not readable.

  • karthik143 Profile Picture
    327 on at

    in cheild table i have three feilds (ID,NAME,LOCATION).ID feild have drop down in that drop down data is 1,2.if i select 1 in ID feild i have to get data automatically in NAME feild that is A. that  data  already in parent tabe.

  • Verified answer
    UmesH@ Profile Picture
    810 on at

    Table Parent

    id Name

    1   A

    2   B

    Table Chield

    id Name Location

    ----------------------------

    First Create Relation in Child Table Like

    1> Create EDT and Set reference table property (your Parent table name).

    2>go to table expand it Click on Relation Create New Relation in Table Property fill you Parent Table Name. after Right click on Create Relation and Create new Normal Relation and Set Property Field your Child Table Field(id) and related filed your Parent table field(id).

    3> Child table field set in relation EDT which One you Created before.

    and you will get DropDown in Grid in Child table.

    ---------------------------------------------------

    If you want when you select id 1 then automatically name will fill in child table then you have to create method in Child table

    1> go to Child table method create new display method and set your logic there.

    like

    Display str MethodName()
    {
        ParentTable objParentTable;
        ;
        select Name from objParentTable where objParentTable.id == this.id;
        return objParentTable.Name;
    }

    2> now Copy method name and in form grid name field (Child table name string control) property set method name.

    Now run and you will get Popup and Name also.

    Thank you.

    if Suggested ans Reply.

  • karthik143 Profile Picture
    327 on at

    thank you ill try with your logic

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    you are trying to go into an  architecture, which is resulting in unnecessary data.

    One simple way can be as following.

    Create a relationship on your Child Table. Using RecId  of ParentTable

    ChildTable.RefRecId == ParenetTable.RecId

    RefRecId is a new added field of 64-bit INT, and remove both field (id, name) from child table.

    Now use reference group to display any information from Parent Table to Child Form.

    Note display methods have issues such as You cannot filter by Grid, These can make your form load slow, in some situations

  • Suggested answer
    Divya Lakshmi Profile Picture
    745 on at

    Hi,

     You can take up an below best example in-order to solve your requirement.

     For eg:

        In SalesOrder form when you create new sales order.

        Sub form(Form name : SalesCreateOrder, Form display name: Create Sales order)  will be opened to enter customer account details etc.

       In that particular form when you select customer account ,Customer name and delivery name will be filled. Here Customer is a display method whereas delivery name is a field.

     Hope this helps!

  • karthik143 Profile Picture
    327 on at

    for that which method we have to use can u pls show me example code for getting name and delivery.......

  • Suggested answer
    UmesH@ Profile Picture
    810 on at

    Right Click on table Method and Create New Method.

       Display str MethodName()

       {

           ParentTable objParentTable;

           ;

           select Name from objParentTable where objParentTable.id == this.id;

           return objParentTable.Name;

       }

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans