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 :
Dynamics 365 Community / Blogs / The Dynamics 365 Library / AX 2012 : Add/Remove Dynali...

AX 2012 : Add/Remove Dynalink through X++

Faisal Fareed Profile Picture Faisal Fareed 10,796 User Group Leader
DynaLinks can be removed and added between datasources on form using this code;

The following code is implemented in the Click event of a button.

ClearDynaLinks() will remove all existing dynaLinks [these can be seen by right click on the click > Personalise > Query tab > under dataSource node

AddDynalink() method has three parameters;

1. Source table field
2. Destination table
3. Destination table field

void clicked()
{
    SalesQuotationLine_ds.query().dataSourceNo(1).clearDynalinks();
    SalesQuotationLine_ds.query().dataSourceNo(1).addDynalink(fieldNum(SalesQuotationLine, QuotationId),
                                                         SAB_DocQuoteGroupRelation,
                                                         fieldNum(SAB_DocQuoteGroupRelation,SalesQuotationId));
        
}


This was originally posted here.

Comments

*This post is locked for comments