AX 2012: Add dynalink in X++

Use the following code to add dynalink to the form datasource query:

public void init()
{
    super();
    
    this.query().dataSourceTable(tableNum(MzkPurchTrackingDetailsTable)).clearDynalinks();
    this.query().dataSourceTable(tableNum(MzkPurchTrackingDetailsTable)).addDynalink(
        fieldNum(MzkPurchTrackingDetailsTable, PurchId),
        PurchParmTable,
        fieldNum(PurchParmTable, PurchId));
}

Where,

  • First parameter is the source table field
  • Second parameter is the destination table
  • Third parameter is the destination table field
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s