Dynamics 365 Blog - Page 5

These posts are machine-translated.

Create lookup for simple unbound stringcontrol

The following code is intended to demonstrate how to add lookup functionality to a data-unbound StringControl.

[Control("String")]
class FormStringControl1
{
    public void lookup()
    {
        //super();
        SysTableLookup systableLookup =
            SysTableLookup::newParameters(tableNum(CustGroup), this);

        systableLookup.addLookupfield(fieldNum(CustGroup, CustGroup), true);
        systableLookup.addLookupfield(fieldNum(CustGroup, Name), false);
        systableLookup.performFormLookup();
    }
}

The next example is an extension of the above, but now a query is used to limit the values ??to be displayed.

[Control("String")]
class FormStringControl1
{
    public void lookup()
    {
        //super();
        SysTableLookup systableLookup =
            SysTableLookup::newParameters(tableNum(CustGroup), this);
        Query query;

        query = new Query();
        query.addDataSource(tableNum(CustGroup));

        query.dataSourceTable(tableNum(CustGroup)).addRange(
            fieldNum(CustGroup, CustGroup)).value("??");
        systableLookup.parmQuery(query);

        systableLookup.addLookupfield(fieldNum(CustGroup, CustGroup), true);
        systableLookup.addLookupfield(fieldNum(CustGroup, Name), false);

        systableLookup.performFormLookup();
    }
}

 

 


 
 

Create a form extension

In this article, I would like to briefly explain how you can extend a form via a form extension.

After having created or opening a corresponding project, you look for the respective form from the Application Explorer. BTW: The available filter options are very useful.

Use the context menu of the form to select the option Create extension.

Ideally the form extension should be renamed according to your own naming conventions. In the example I have added the abbreviation DMO to the suggested name FMCustomer.Extension.

Then you open this extension in the workspace and adjust it as needed. In my example, I add a previously created field of the table to the grid via drag & drop.

Screenshot


 
 

Add a new field to an existing table/Create a table extension

In this post I want to show how to add a field to an existing table.

After having created or opening a corresponding project, you look for the respective form from the Application Explorer. BTW: The available filter options are very useful.

Screenshot


 
 

Override lookup of a field extending RecId

ScreenshotUsing the code example below, I want to show how to override the lookup method of a RecId/RefRecId field. Such a lookup is also referred to as a Referencelookup.

The example serves quite concretely to be able to select a financial dimension, but only one of the type cost center.


 
 

Create Model in Visual Studio

The first step in creating customizations in Microsoft Dynamics 365 for Finance and Operations (D365) is to create a model/package and project.

To do this, click Dynamics 365 > Model Management > Create model and go through the wizard as shown in the screenshots below.


 
 

Dynamics AX 7 Technical Preview Help Wiki

All of you, who already have the pleasure to deal with the next release of Dynamics AX will have their fun with this official Wiki.

https://ax.help.dynamics.com/en/


 
 
Pages « 1 2 3 4 5 

 

 
 
 
Posts of the actual month
März 2024
MoTuWeThFrSaSu
 123
45678910
11121314151617
18192021222324
25262728293031
 
© 2006-2024 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.