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 :
Finance | Project Operations, Human Resources, ...
Unanswered

Field name show based on a caller form in X++

(0) ShareShare
ReportReport
Posted on by 351

Hi all,

I have a two Form one is Form A and another one is Form B.

Now, in the form A i added in action pane Form B if i click Form B , i want to Form A fields all show to in the Form B.

Form B:- Table fields

1.Field name (three fields in Form A i want to lookup )

2.Table Id (Form A table ID i want pick here)

3. RefRecid( Form A recid i want to pick here)

Three fields in the Form B.

Form A:- Table

1. Id

2.Description

3. text

Give me a example.

Thanks 

I have the same question (0)
  • ergun sahin Profile Picture
    8,826 Moderator on at

    First of all, I assume that all the fields in form A are in the same table.

    In this case, you can add tableA to the second form, or add unbounded controls,

    in FormB's init method you can capture the recording and fill in the unbounded controls with;

    "TableA = element.args().record();"  ,

    Note: Don't forget to check that the record is not null and is the correct table before assigning.

    You should also set the autoDeclaration property of unbounded controls to Yes.

  • waytod365 Profile Picture
    351 on at

    Sir , the thing is that its special kinda form.

    Table fields :-

    1. Field name

    2. refRecid

    3. Table Id

    4.  language

    5. original text

    6.  translated text

    Now, i add in this form action pane any form.

    Etc: HcmWorker. (I added hcmworker form action pane in my new form)

    if i click my new form button then i want to

    Form like :-

    . Field name (HcmWorker table all fields as lookup)

    2. refRecid (hcmWorker recid )

    3. Table Id (hcmworker table id)

    4.  language

    5. original text

    6.  translated text

    Why i'm doing this kinda form already standard form used translator its only one form one table that is why i don;t use that step.

    as i mentioned above form i use all forms.

    Please give me example fields name how can i lookup (DitTable or DitField any class need)

    table id, recid how can i show sir?

    Thanks  

  • ergun sahin Profile Picture
    8,826 Moderator on at

    I'm not sure I understand, but if your goal is to get fields labels, you can do this with fieldId2pname.

    Below I have shared the usage of fieldId2pname. Actually, it is not a structure that you are unfamiliar with, we use it frequently in validate methods ("Field '%1' must be filled")

    ret = checkFailed(strFmt("@SYS84753", fieldId2pname(tableNum(MyTable), fieldNum(MyTable, MyField))));

    If you come to the second form from more than one different table, you can determine which table it came with with a simple switch case.

    d365ffo.com/.../

  • waytod365 Profile Picture
    351 on at

    Sir, i explain in brief.

    FieldN.PNG

    As i highlighted the image Table ID, Recid, Field name the three fields i want to when i come from form A.

    Etc: Form A table fields :-

    1. Request number

    2. Request date

    3. description

    4........

    There is 11 fields something.

    Form B :- As shown in the picture form B :- that 4 fields only in Form B.

    Now, when i click in the form A action pane button Form B open and show [table Id : Form A table Id, Recid : Form A recid, Field name lookup (form A 11 fields)

    So that how to do in x++ and give me a example sir.

    Thanks 

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans