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, ...
Answered

data is not displaying in Form - LedgerTransSettled in AX 2009

(0) ShareShare
ReportReport
Posted on by 30

Hi All,

GL - Periodic - Ledger Settlements. 

I have settled 2 transactions

I have checked in Ledger Settlement table, Settle Id got created

0876.j1.jpg

Now I go to particular main account 002130 > Transaction > Select that particular vouchers > Ledger settlements button

0407.j2.jpg

It's showing the recid but data is not display in form.

Form - LedgerTransSettled

form - init

public void init()
{
    super();

    checkInRed = LedgerParameters::find().NegativeAmountsInRed_CN;
}

set criteria

void setCriteria()
{
    LedgerTrans             ledgerTransLocal = element.args().record();
    LedgerTransSettlement   ledgerTransSettlementLocal;
    ;
    select ledgerTransSettlementLocal
        where ledgerTransSettlementLocal.TransRecId == ledgerTransLocal.RecId;

    if (ledgerTransSettlementLocal)
    {
        settleId = ledgerTransSettlementLocal.SettleId;
    }
    else
    {
        settleId = SysQuery::valueEmptyString();
    }

    ledgerTransSettlement_ds.query().dataSourceTable(tablenum(LedgerTransSettlement)).clearRanges();
    ledgerTransSettlement_ds.query().dataSourceTable(tablenum(LedgerTransSettlement)).addRange(fieldnum(LedgerTransSettlement, SettleId)).value(settleId);
}

ledgerTrans - init

public void init()
{
    ;
    super();

    if (LedgerParameters::find().ShowAmountDebitCredit_CN)
    {
        ledgerTrans_AmountCur.visible(false);
        amountCurDebit.visible(true);
        amountCurCredit.visible(true);
        ledgerTrans_AmountMST.visible(false);
        amountMstDebit.visible(true);
        amountMstCredit.visible(true);
    }
    else
    {
        ledgerTrans_AmountCur.visible(true);
        amountCurDebit.visible(false);
        amountCurCredit.visible(false);
        ledgerTrans_AmountMST.visible(true);
        amountMstDebit.visible(false);
        amountMstCredit.visible(false);
    }
}

ledgerTrans - display option

public void init()
{
    ;
    super();

    if (LedgerParameters::find().ShowAmountDebitCredit_CN)
    {
        ledgerTrans_AmountCur.visible(false);
        amountCurDebit.visible(true);
        amountCurCredit.visible(true);
        ledgerTrans_AmountMST.visible(false);
        amountMstDebit.visible(true);
        amountMstCredit.visible(true);
    }
    else
    {
        ledgerTrans_AmountCur.visible(true);
        amountCurDebit.visible(false);
        amountCurCredit.visible(false);
        ledgerTrans_AmountMST.visible(true);
        amountMstDebit.visible(false);
        amountMstCredit.visible(false);
    }
}

ledger trans - lincActive

public void linkActive()
{
    element.setCriteria();
    super();
}

As per the set criteria method, it should display the data in form. But why data is not displaying in form ?  is it BUGS?

Note - During debugging I have found the settled SID-712706 id also in set criteria method but data not displaying in form.

Please let me know the exact reason. We need to confirm business user tomorrow. 

Please give me more shed on this.

thanks!

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

    can you check for any other range/relation etc.

    via;

    Right click/Personalize--> in Personalization form/ Query Tab

    pastedimage1633984312090v1.png

  • @rp@n Profile Picture
    30 on at

    Hi Ergun,

    Yes, i have checked

    7823.J3.jpg

    Here the settle id is is showing correct.

    But the above relation with Dylnalink - ConsolidataedCompany and ConsolidatedRefRecId_BR bith having no data.

    Is this the reason to not display the record?

    what dynalink does here??

  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    Yes, the record does not come bucause the relationship.

    Are you coming to this form through the LedgerTrans record (Otherwise, I could not understand the development in BR localization)

    There are a few things you can do;

    Of course, the first thing that comes to mind is clearing the dynalink, but I do not recommend it because we do not know the purpose and importance of the (BR) development.

    Secondly, you can check whether such a record exists independently of the company.

    There is probably a relationship with this field in the table. You might consider removing it as well. (we don't know the importance of BR localization as in the first step)

    Finally, you can search for the BR suffixed field in AOT and try to understand under what circumstances it fills up.

  • @rp@n Profile Picture
    30 on at

    Hi Ergun,

    I think it do the duplicate of the form and clear the dynalink. And restructure the form as per the requirement.  So, in that way will not distrubed the original one 

    Kindly let me know,  how will clear the dynalink?

    Please give me more shed on this 

    Thanks!

  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    http://codingchamp.blogspot.com/2014/09/remove-dynalinks-between-forms-in.html?m=1

    Let me remind you again. There must be a reason for establishing a relationship in the localization.

  • @rp@n Profile Picture
    30 on at

    Hi Ergun 

    My requirement is for another legal entity. 

    Please give me more shed on this 

  • @rp@n Profile Picture
    30 on at

    Ergun,

    Pls let me know, where is define the dynalink between 2 forms? Is it in properties level?

    I have not found any relation

    Pls give me more shed on this 

    Thanks!

  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    Dynalink come automatically via relations (table/edt). What you must do is clean it at form/ds init

    form.init (after super)

    TableName_ds.query().dataSourceTable(tableNum(TableName)).clearDynalinks();

  • @rp@n Profile Picture
    30 on at

    Hi Ergun,

    You mean to say form - DS - init method ?

    Kindly let me know which code creating a dynalink ?

    Please give me more shed on this 

    thanks!

  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    "Dynamic links are created by using the Application Object Tree (AOT), without writing any code."

    docs.microsoft.com/.../how-to-link-two-forms-by-using-dynamic-links

    Of course, it is possible to add it with code (in the example I shared, it adds a new link after clearing the existing links, but in your case you will just clean it)

    Remove/Add 

    community.dynamics.com/.../ax-2012-add-remove-dynalink-through-x

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 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans