Leader Board

Microsoft Dynamics AX five-layer solution architecture

The Microsoft Dynamics AX five-layer solution architecture, logically partitions a Microsoft Dynamics AX solution into an application platform layer, a foundation application domain layer, a horizontal application domain layer, an industry application domain layer, and a vertical application domain layer. The components in all architecture layers are designed to meet Microsoft internationalization, localization, and security standards, and all layers are built on the Microsoft technology platform.

Note: The layers in the Microsoft Dynamics AX five-layer architecture are different from the model layers that are part of the Microsoft Dynamics AX customization framework described later in this book. Architectural layers are logical partitions of an end-to-end solution. Customization layers are physical partitions of application domain code.

The Microsoft Dynamics AX application platform and application domain components are delivered on the Microsoft technology platform. This platform consists of the Windows client, the Office suite of products, Windows Server, SQL Server, SSAS, SSRS, SharePoint Server, the Microsoft ASP.NET web application framework, the .NET Framework, and the Microsoft Visual Studio integrated development environment (IDE).

 

The following logical partitions are layered on top of the Microsoft technology platform:
■ Layer 1: Application platform layer The application platform layer provides the system frameworks and tools that support the development of scalable, customizable, and extensible application domain components. This layer consists of the MorphX model-based development environment, the X++ programming language, the Microsoft Dynamics AX Windows client framework, the Enterprise Portal web application framework, the AOS, and the application platform system framework. The architecture of the components in the application platform
layer is described in the following section.

■ Layer 2: Foundation application domain layer The foundation application domain layer consists of domain-specific reference models in addition to domain-specific resource modeling, policy modeling, event documenting, and document processing frameworks that are extended into organization administration and operational domains. Examples of domain- specific reference models include the fiscal calendar, the operations calendar, the language code, and the unit of measure reference models. Examples of domain-specific resource models include the party model, the organization model, the operations resource model, the product model, and the location model. The source document framework and the accounting distribution and journalizing process frameworks are also part of this layer. Chapter 19, “Application frameworks,” describes the conceptual design of a number of the frameworks in this layer.

■ Layer 3: Horizontal application domain layer The horizontal application layer consists of application domain workloads that integrate the financial resource, operations resource, and human resource management processes that can be owned and controlled by organizations.
Example workloads include the operations management workload, the supply chain management workload, the supplier relationship management workload, the product information management workload, the financial management workload, the customer relationship management workload, and the human capital management workload. The Microsoft Dynamics AX application can be extended with additional workloads. (The workloads
that are part of the Microsoft Dynamics AX solution are beyond the scope of this book.)

■ Layer 4: Industry application domain The industry application layer consists of application domain workloads that integrate the financial resource, operations resource, and human resource management processes that are specific to organizations that operate in particular industry sectors. Example industries include discrete manufacturing, process manufacturing, distribution, retail, service, and public sector. Workloads in this layer are customized to satisfy industry-specific requirements.

■ Layer 5: Vertical application domain The vertical application layer consists of application domain workloads that integrate the financial resource, operations resource, and human resource management processes that are specific to organizations that operate in a particular vertical industry and to organizations that are subject to local customs and regulations. Example vertical industries include beer and wine manufacturing, automobile manufacturing,
government, and advertising professional services. Workloads in this layer are customized to satisfy vertical industry and localization requirements.

Creating a Basic Table Report (SSRS)

This post will help you create a basic table report based on the AdventureWorks2008R2 database using Report Designer. You can also use Report Builder or the Report Wizard to create reports. In this post, you will create a report project, set up connection information, define a query, add a Table data region, group and total some fields, and preview the report.

Create a report server project
  1. Click Start, point to Programs, point to Microsoft SQL Server 2008 R2, and then click Business Intelligence Development Studio.

  2. On the File menu, point to New, and then click Project.

  3. In the Project Types list, click Business Intelligence Projects.

  4. In the Templates list, click Report Server Project.

  5. In Name, type Tutorial.

  6. Click OK to create the project.

    The Tutorial project is displayed in Solution Explorer.

Create a new report definition file
  1. In Solution Explorer, right-click Reports, point to Add, and click New Item.

  2. In the Add New Item dialog box, under Templates, click Report.

  3. In Name, type Sales Orders.rdl and then click Add, Report Designer opens and displays the new .rdl file in Design view.

Set up a connection
  1. In the Report Data pane, click New and then click Data Source ( If the Report Data pane is not visible, from the View menu, click Report Data ).

  2. In Name, type AdventureWorks2008R2.

  3. Make sure Embedded connection is selected.

  4. In Type, select Microsoft SQL Server.

  5. In Connection string, type the following:

    Data source=localhost; initial catalog=AdventureWorks2008R2

    This connection string assumes that Business Intelligence Development Studio, the report server, and the AdventureWorks2008R2 database are all installed on the local computer and that you have permission to log on to the AdventureWorks2008R2 database.

    If you are using SQL Server Express with Advanced Services or a named instance, the connection string must include instance information:

    Data source=localhost\SQLEXPRESS; initial catalog=AdventureWorks2008R2



  6. Click OK. A data source called AdventureWorks2008R2 is added to the Report Data pane.


Define a Transact-SQL query for report data



  1. In the Report Data pane, click New, and then click Dataset. The Dataset Properties dialog box opens.



  2. In the Name box, type AdventureWorksDataset.



  3. Click the Use a dataset embedded in my report radio button. Make sure the name of your data source, AdventureWorks, is in the Data source text box, and that the Query type is Text.



  4. Type, or copy and paste, the following Transact-SQL query into the Query box.

    SELECT 
    soh.OrderDate AS [Date],
    soh.SalesOrderNumber AS [Order],
    pps.Name AS Subcat, pp.Name as Product,
    SUM(sd.OrderQty) AS Qty,
    SUM(sd.LineTotal) AS LineTotal
    FROM Sales.SalesPerson sp
    INNER JOIN Sales.SalesOrderHeader AS soh
    ON sp.BusinessEntityID = soh.SalesPersonID
    INNER JOIN Sales.SalesOrderDetail AS sd
    ON sd.SalesOrderID = soh.SalesOrderID
    INNER JOIN Production.Product AS pp
    ON sd.ProductID = pp.ProductID
    INNER JOIN Production.ProductSubcategory AS pps
    ON pp.ProductSubcategoryID = pps.ProductSubcategoryID
    INNER JOIN Production.ProductCategory AS ppc
    ON ppc.ProductCategoryID = pps.ProductCategoryID
    GROUP BY ppc.Name, soh.OrderDate, soh.SalesOrderNumber, pps.Name, pp.Name,
    soh.SalesPersonID
    HAVING ppc.Name = 'Clothing'


  5. (Optional) Click the Query Designer button. The query is displayed in the text-based query designer. You can toggle to the graphical query designer by clicking Edit As Text. View the results of the query by clicking the Run (!) button on the query designer toolbar.

    You see the data from six fields from four different tables in the AdventureWorks2008R2 database. The query makes use of Transact-SQL functionality such as aliases. For example, the SalesOrderHeader table is called soh.

    Click OK to exit the query designer.



  6. Click OK to exit the Dataset Properties dialog box.

    Your AdventureWorksDataset dataset fields appear in the Report Data pane.


Adding a Table to the Report (Reporting Services)


To Add a Table data region and fields to a report layout



  1. In the Toolbox, click Table, and then click on the design surface. Report Designer draws a table data region with three columns in the center of the design surface.

    NoteNote

    The Toolbox may appear as a tab on the left side of the Report Data pane. To open the Toolbox, move the pointer over the Toolbox tab. If the Toolbox is not visible, from the View menu, click Toolbox.



  2. In the Report Data pane, expand the AdventureWorksDataset dataset to display the fields.



  3. Drag the Date field from the Report Data pane to the first column in the table.

    When you drop the field into the first column, two things happen. First, the data cell will display the field name, known as the field expression, in brackets: [Date]. Second, a column header value is automatically added to Header row, just above the field expression. By default, the column is the name of the field. You can select the Header row text and type a new name.



  4. Drag the Order field from the Report Data pane to the second column in the table.



  5. Drag the Product field from the Report Data pane to the third column in the table.



  6. Drag the Qty field to the right edge of the third column until you get a vertical cursor and the mouse pointer includes a plus sign [+]. When you release the mouse button, a fourth column is created for [Qty].



  7. Add the LineTotal field in the same way, creating a fifth column.

    The column header is Line Total. Report Designer automatically creates a friendly name for the column by splitting LineTotal into two words.

    The following diagram shows a table data region that has been populated with these fields: Date, Order, Product, Qty, and Line Total.

    Design, Table with header row and detail row


Preview Your Report


Previewing a report enables you to easily view the rendered report without having to first publish it to a report server. You will probably want to preview your report frequently during design time.

To Preview a report



  • Click the Preview tab. Report Designer runs the report and displays it in Preview view.

    The following diagram shows part of the report in Preview view.

    Preview, Detail rows of table with 5 columns

    Notice that the currency (in the Line Total column) has six places after the decimal, and the date has an unnecessary time stamp. You're going to fix that formatting in the next lesson.


Now that you've added a table and some fields to the Sales Orders report, you can format the date and currency fields and the column headers.

Format the Date


The Date field displays date and time information by default. You can format it to display only the date.

Format a date field



  1. Click the Design tab.



  2. Right-click the cell with the [Date] field expression and then click Text BoxProperties.



  3. Click Number, and then in the Category field, select Date.



  4. In the Type box, select January 31, 2000.



  5. Click OK.


Format the Currency


The LineTotal field displays a general number. Format it to display the number as currency.

To format a currency field



  1. Right-click the cell with the [LineTotal] field expression and then click Text BoxProperties.



  2. Click Number, and in the Category field, select Currency.



  3. If your regional setting is English (United States), the defaults should be:



    • Decimal places: 2



    • Negative numbers: ($12345.00)



    • Symbol: $ English (United States)



  4. Select Use 1000 separator (,).

    If the sample text is: $12,345.00, then your settings are correct.



  5. Click OK.


Change Text Style and Column Widths


You can also change the formatting of the header row to differentiate it from the rows of data in the report. Lastly, you will adjust the widths of the columns.

To format header rows and table columns



  1. Click the table so that column and row handles appear above and next to the table.

    Design, Table with header row and detail row

    The gray bars along the top and side of the table are the column and row handles.



  2. Point to the line between column handles so that the cursor changes into a double-headed arrow. Drag the columns to the size you want.



  3. Select the row containing column header labels and from the Format menu, point to Font and then click Bold.



  4. To preview your report, click the Preview tab. It should look something like this:

    Preview of table with bold column headers


Grouping Data in A report

To group data in a report



  1. Click the Design tab.



  2. From the Report Data pane, drag the Date field to the Row Groups pane. Place it above the row called Details.

    Note that the row handle now has a bracket in it, to show a group. The table now also has two Date columns -- one on either side of a vertical dotted line.

    Date field added to Row Groups pane



  3. From the Report Data pane, drag the Order field to the Row Groups pane. Place it below Date and above Details.

    Note that the row handle now has two brackets in it, to show two groups. The table now has two Order columns, too.



  4. Delete the original Date and Order columns to the right of the double line. This removes this individual record values so that only the group value is displayed. Select the column handles for the two columns, right-click and click Delete Columns.

    Select columns to delete

    You can format the column headers and date again.



  5. Switch to the Preview tab to preview the report. It should look similar to the following illustration:

    Table grouped by date and then order


To add totals to a report



  1. Switch to Design view.



  2. Right-click the data region cell that contains the field [LineTotal], and click Add Total.

    This adds a row with a sum of the dollar amount for each order.



  3. Right-click the cell that contains the field [Qty], and click Add Total.

    This adds a sum of the quantity for each order to the totals row.



  4. In the empty cell to the left of Sum[Qty], type the label "Order Total".



  5. You can add a background color to the totals row. Select the two sum cells and the label cell.



  6. On the Format menu, click Background Color and click Light Gray.

    Design view: Basic table with order total


To add a daily total to a report



  1. Right-click the Order cell, point to Add Total, and click After.

    This adds a new row containing sums of the quantity and dollar amount for each day, and the label "Total" in the Order column.



  2. Type the word Daily before the word Total in the same cell, so it reads Daily Total.



  3. Select the Daily Total cell, the two Sum cells and the empty cell between them.



  4. On the Format menu, click Background Color and click Orange.

    Design view: Daily total row in basic table


To add a grand total to a report



  1. Right-click the Date cell, point to Add Total, and click After.

    This adds a new row containing sums of the quantity and dollar amount for the entire report, and the Total label in the Date column.



  2. Type the word Grand before the word Total in the same cell, so it reads Grand Total.



  3. Select the Grand Total cell, the two Sum cells and the empty cells between them.



  4. On the Format menu, click Background Color and click Light Blue.

    Design view: Grand total in basic table



  5. Click Preview.

    The last page should look something like this, although your Order Total, Daily Total, and Grand Total may be on a second page:

    Preview: Basic table with grand total

Step-by-Step Checklist for Debugging Batch Jobs in Dynamics Ax

Imparted from here

A. Enable Global Breakpoints

When debugging in the client, you want to set breakpoints that can be caught by the debugger. The following steps show how.

1. Launch the Microsoft Dynamics AX Configuration tool from the Start >Administrative Tools menu on your client computer. The first time this tool opens, you will be on the Original configuration. Create a new configuration named Debug. Click Manage and choose the Create Configuration menu option.

2. Enter a new name such as Debug, and choose copy from Original configuration and click Ok.

3. A new configuration is created and shown in the configuration tool. Click the Developer tab.

4. Choose the following options:

· “Enable global breakpoints to debug code running in the Business Connector or client” (required for this scenario)

· “Enable user breakpoints to debug code in the Business Connector” (optional for this scenario)

Note: Take special care that the Configuration Target remains set to Local Client since this is the only client you can set global breakpoints from.

B. Configure Your AOS to Run Under Your User Credentials

1. Launch the Services utility on your AOS server machine, and choose the AOS instance that you are configuring for debugging.

2. Right-click on your chosen AOS instance name and choose Properties. On the properties window, choose the Logon tab. Select “This account” for the Logon As option. Enter your full Domain account {e.g. contoso\YourName } and password credentials. This account must be the same user account as the account used for debugging batch code.

3. Click Apply once you have modified the user account.

4. You will be prompted to restart the service. Choose yes to restart the service (note: ensure other users are not working on this service before restarting it).

C. Configure the Dynamics AX Server to Enable Debugging

1. From your Start > Administrative Tools menu, open the Microsoft Dynamics AX Server Configuration tool. This tool has the same option to Manage configurations that you saw earlier in the client configuration tool.

2. Choose the Manage and Create Configuration option to create a new server configuration. As before, copy from the original configuration and choose Debug as the name.

3. Verify the AOS instance matches the instance you want to use for debugging.

4. Choose the following options:

· “Enable breakpoints to debug X++ code running on this server” (required for this scenario)

· “Enable global breakpoints to debug X++ code running in batch jobs” (required for this scenario)

Note: When you click Apply, you will be prompted to restart the service, and you should choose Yes.

D. Set breakpoints and start debugging.

1. Launch the Dynamics AX Client from the Start menu, and open the developer workspace.

2. Open the class you would like to debug from the AOT and set breakpoints at desired locations.

3. Launch the Dynamics Ax Debugger from the Start menu. The debugger must be opened directly in order to find and catch global breakpoints.

4. Schedule the batch job to run.

Example: To schedule work calendar delete to run in batch; launch the WorkCalendarDelete class in the AOT, click Batch tab, check Batch Processing check box and click Ok.

5. Wait for the debugger to catch the breakpoints.

Creating and posting Ledger Journal via code

static void InsertLedgerJournal(Args _args)
{
    LedgerJournalName           ledgerJournalName;
    LedgerJournalTable          ledgerJournalTable;
    LedgerJournalTrans          ledgerJournalTrans;
    LedgerJournalCheckPost      ledgerJournalCheckPost;
    NumberSeq                   numberSeq;
    ;

    ttsbegin;

    // Find LedgerJournalname Record
    select firstonly   ledgerJournalName where ledgerJournalname.JournalType == LedgerJournalType::Daily;

    //Create Ledger Journal Table
    ledgerJournalTable.JournalName      = ledgerJournalName.JournalName ;
    ledgerJournalTable.initFromLedgerJournalName();
    ledgerJournalTable.Name             = "Daily Trans";
    ledgerJournalTable.insert();
    numberSeq                           = NumberSeq::newGetVoucherFromCode(ledgerJournalTable.VoucherSeries);
    ledgerJournalTrans.Voucher          = numberSeq.voucher();

    //Create Transaction Line
    ledgerJournalTrans.JournalNum       = ledgerjournalName.JournalName;
    ledgerJournalTrans.CurrencyCode     = 'EUR';
    ledgerJournalTrans.ExchRate         = Currency::exchRate(ledgerJournalTrans.CurrencyCode);
    ledgerJournalTrans.AccountNum       = '140567';
    ledgerJournalTrans.AccountType      = ledgerJournalACType::Ledger;
    ledgerJournalTrans.AmountCurDebit   = 102.00;
    ledgerJournalTrans.TransDate        = today();
    ledgerJournalTrans.Txt              = 'good Product';
    ledgerJournalTrans.OffsetAccount    = '140567';
    ledgerJournalTrans.insert();

    info(strfmt('Journal Id: %1',ledgerJournalTable.JournalNum));

    // Post Journal
    ledgerJournalCheckPost              = ledgerJournalCheckPost::newLedgerJournalTable(ledgerJournaltable,Noyes::Yes);
    LedgerJournalCheckPost.run();
}

Exporting data to Excel by Code x++

static void DASCreateExcelDocument(Args _args)
{
   SysExcelApplication  xlsApplication;
   SysExcelWorkBooks    xlsWorkBookCollection;
   SysExcelWorkBook     xlsWorkBook;
   SysExcelWorkSheets   xlsWorkSheetCollection;
   SysExcelWorkSheet    xlsWorkSheet;
   SysExcelRange        xlsRange;
   CustTable            custTable;
   int                  row = 1;
   str                  fileName;
   ;
   //Filename
   fileName = "C:\\Test.xlsx";
   //Initialize Excel instance
   xlsApplication           = SysExcelApplication::construct();
   //Open Excel document
   //xlsApplication.visible(true);
   //Create Excel WorkBook and WorkSheet
   xlsWorkBookCollection    = xlsApplication.workbooks();
   xlsWorkBook              = xlsWorkBookCollection.add();
   xlsWorkSheetCollection   = xlsWorkBook.worksheets();
   xlsWorkSheet             = xlsWorkSheetCollection.itemFromNum(1);
   //Excel columns captions
   xlsWorkSheet.cells().item(row,1).value("Account Num");
   xlsWorkSheet.cells().item(row,2).value("Name");
   row++;
   //Fill Excel with CustTable AccountNum and Name fields (only 10 records)
   while select custTable
   {
      if(row == 10)
        break;
      xlsWorkSheet.cells().item(row,1).value(custTable.AccountNum);
      xlsWorkSheet.cells().item(row,2).value(custTable.Name);
      row++;
   }
   //Check whether the document already exists
   if(WinApi::fileExists(fileName))
      WinApi::deleteFile(fileName);
   //Save Excel document
   xlsWorkbook.saveAs(fileName);
   //Open Excel document
   xlsApplication.visible(true);
   //Close Excel
   //xlsApplication.quit();
   //xlsApplication.finalize();
}

Sample to manipulate string Function in Dynamics AX

 

1 – str2Capital () : Convert first character in to Capital
static void Jobtest(Args _args)
        {
            str source,desti;
            ;
            source  = 'dynamics ax';
            desti   = str2Capital(source);
            info(strfmt("%1 : %2",source,desti));
        }
    Using str2CapitalWord() method convert the first character of the first word in Sentence to Capital.

2- str2Con () : Concatenate the word or sentence from specified character
static void Jobtest(Args _args)
        {
            str         source,desti;
            container   Con;
            int         i;
            ;
            source  = 'dyna,mics, ax';
            Con   = str2Con(source,',');
            for (i = 1; i <= conlen(Con); i++)
            {
                info(strfmt("%1",conpeek(Con,i)));
            }
        }

3-  str2Date() : Date in string type & return it as Date type
static void Jobtest(Args _args)
        {
            str         input;
            Date        output
            ;
            input  = '05/30/2010';
            output  = str2Date(input,213);
            info(strfmt("%1",output));
        }
        123 : DMY
        213 : MDY

4- strIntOk () : Check a string which contain integer value
static void Jobtest(Args _args)
        {
            str         input;
            boolean     output;
            ;
            input   = '1294';
            output  = str2IntOk(input);
            if(output)
                info(strfmt("Integer Value"));
            else
                info(strfmt("Not a Integer Value"));
        }

5- strEndsWith () : Check whether end characters are matching or not

static void Jobtest(Args _args)
        {
            str         input1,input2;
            boolean     output;
            ;
            input1  = 'dyanmics ax';
            input2  = 'ax';
            output  = strEndsWith(input1,input2);
            if(output)
                info(strfmt("OK"));
            else
                info(strfmt("Not OK"));
        }

6- strLFix  :  strLfix(str _str, int _lenght [, char _char])

Add character _char after string _str to obtain a string long _leng.

Default filler chararcer is ' '.

strLfix('aaa', 5, '_') //returns the text string 'aaa__'.

If _str is longer than _leght function return a substring of _str.

strLfix('dynamics ax',5);

//returns the text string ‘dynam'.

How to: Refresh the Calling Form [AX 2012]

Imparted from here

You often open a dialog or drop dialog when you are working with another form. As a result, you might want to refresh the parent form after you finish the action on the dialog or drop dialog form. However, not every dialog form requires that you update the calling form. Typically, you refresh the parent form when the information that you provide in the dialog form appears on that form.

To follow these steps, you must first create a dialog or drop dialog form. For information about how to create a dialog or drop dialog form, see How to: Create a Dialog Form. In addition, you may want to add button controls to the parent form that enable you to open the dialog or drop dialog form.

Refreshing a Form with a Single Root Data Source


To refresh a parent form, you can often use a task to refresh the form. You should use a task when the form has a single root data source. For example, theCustTableListPage, SalesTable, VendTable, and HcmWorker forms all have a single root data source. When you use a task to refresh the form, you cause a call to the research method for all data source tables associated with the form.

To update the form root data source
  1. In the AOT, expand Forms, find the dialog or drop dialog form that you want to work with. Expand the form node.

  2. Right-click the Methods node, click Override method, and then click closeOK. The method opens in the code editor.

  3. Use the FormRun class together with the #taskF5 refresh task to refresh any form that opens this dialog or drop dialog form.

    The following code example shows how to get a reference to the calling form and how to refresh that form. Notice how the formRun instance is populated with a reference to the calling form. Also notice how #taskF5 is used to force a refresh of the specified form.

    X++

    public void closeOk()
    {
    #Task
    FormRun formRun;

    super();

    // Get an instance of the calling form.
    formRun = element.args().caller();

    // If the caller is a form, refresh that form.
    if(formRun)
    {
    formRun.task(#taskF5);
    }
    }


  4. In the code editor, press the compile button. When compiling is finished, close the code editor.



  5. Right-click the form and then click Save.


To refresh the parent form, open the form you use to call the dialog or drop dialog form where you added the previous code. Select a record, open the dialog form, and make a change to a field that appears on the parent form. Click OK to close the dialog form. The parent form is refreshed and shows the value that you updated in the dialog form.

Refreshing a Form with Multiple Root Data Sources





The form that opens your dialog or drop dialog form might have multiple root data sources. For example, the smmActivities form has two root data sources. If you have more than one root data source, you should refresh the data source that includes fields that were updated by using the dialog or drop dialog form.

To find and update a specified root data source



  1. In the AOT, find the dialog or drop dialog form that you want to work with. Expand the form node.



  2. Right-click Methods, click Override method, and then click closeOK. The method opens in the code editor.



  3. Use the FormRun class to get a reference to the calling form. You then have to iterate the list of root data sources to find the data source table that include the fields you updated in the dialog or drop dialog form. You must know the name of the root data source table.

    The following code example shows how to get a reference to the calling form, how to iterate a list of root data sources, and how to use the research method to refresh a specified data source. Notice how the tableNum function specifies the root data source table you want to refresh.

    Caution noteCaution

    In the example, the target root data source table is named Table1. You would have to change this parameter to the name of the root data source table that contains the fields updated by the dialog or drop dialog form.

    X++

    public void closeOk()
    {
    FormRun formRun;
    List dsList;
    ListEnumerator dsListEnumerator;
    FormDataSource formDS;

    super();

    // Get an instance of the calling form.
    formRun = element.args().caller();

    // If the caller is a form, find and refresh the specified root data source.
    if(formRun)
    {
    dsList = formRun.rootFormDataSources();

    if(dsList && dsList.elements() > 0)
    {
    dsListEnumerator = dsList.getEnumerator();

    while(dsListEnumerator.moveNext())
    {
    formDS = dsListEnumerator.current();
    if(formDS.table() == tableNum(Table1))
    {
    formDS.research(true);
    break;
    }
    }
    }
    }
    }


  4. In the code editor, press the compile button. When compiling is finished, close the code editor.



  5. Right-click the form and then click Save.


To refresh the parent form, open the form you use to call the dialog or drop dialog form where you added the previous code. Select a record, open the dialog form, and make a change to a field that appears on the parent form. Click OK to close the dialog form. The parent form is refreshed and shows the value that you updated in the dialog form.

Small-scale deployment Dynamics AX

This topic provides a sample topology for a small-scale deployment. The topology for a small-scale deployment expands on the topology for a single-server deployment that is described in the Single-server deployment topic.

This topology does not offer scalability or high availability. Scalability and high availability are introduced in the large-scale topology that is described in the Large-scale deployment topic. This topology is suitable as a test environment and for training purposes.

The following diagram shows a sample topology for a small-scale deployment.

Small_scale_deployment

 

The following list describes how the computers in this sample topology are used:

  • An Active Directory domain controller is required to deploy Microsoft Dynamics AX components.

  • Windows clients for Microsoft Dynamics AX that connect over a wide area network (WAN) are configured to use Terminal Services to communicate with Application Object Server (AOS). Windows clients on the local area network (LAN) are configured to communicate with AOS directly.

  • AOS is deployed on a single-server computer. AOS can host the following components:

    • Workflow

    • Services and Application Integration Framework (AIF)

  • External applications use services and AIF to exchange data with Microsoft Dynamics AX.

  • A web server can host the following components:

    • Search server

    • Enterprise Portal for Microsoft Dynamics AX

    • Web services on IIS

    • Microsoft Project Server

  • The server that runs Microsoft SQL Server can host the following components:

    • Microsoft Dynamics AX online transaction processing (OLTP) database

    • Model files in the OLTP database

    • Microsoft SQL Server Analysis Services (SSAS)

    • Microsoft SQL Server Reporting Services (SSRS)

Resource Page for Enterprise Portal and Role Centers in Microsoft Dynamics AX 2009

This link below is intended to provide a consolidated view of relevant documentation, videos, solutions to known issues, links to related resources, as well as community sites for implementing Enterprise Portal and Role Centers for Microsoft Dynamics AX 2009.

http://community.dynamics.com/ax/b/axresources/archive/2012/02/13/resource-page-for-enterprise-portal-and-role-centers-in-microsoft-dynamics-ax-2009.aspx#.UUSBhypXtls

Not enough rights to use table 'Signature log' (SIGSignatureLog)

 

ERROR: “Not enough rights to use table 'Signature log' (SIGSignatureLog).”
SOLUTION: After installing AX5 SP1, it creates a new configuration key which it leaves unpicked. go into Administration > Setup > System > Configuration and tick the Electronic Signature tick box

Run Setup in silent mode [AX 2012]

When you run the Setup wizard, Setup is running in interactive mode. In other words, a graphical user interface (GUI) prompts you for the required information. Alternatively, you can run Setup in silent mode. When Setup runs in silent mode, no GUI is displayed. Instead, you supply the required information at the command prompt or in a parameter file. You can install any Microsoft Dynamics AX component in silent mode.

Please follow up this link http://technet.microsoft.com/EN-US/library/aa496627.aspx

Dynamics AX 2009 Keyboard Shortcuts

 
Viewing/Navigation options

Accelerator Keys

Task Description

Alt+F1

Show Navigation Pane (if it is not in auto-hide mode)This shortcut works from both MDI & SDI windows, so it is a good shortcut to get back to the main workspace.

Shift+Alt+F1

Enable/Disable auto-hide for the Navigation Pane

Ctrl+Shift+D

Toggles the Content Pane between Developer and Content modes.  Developer mode makes the content frame (where Area pages & List pages are viewed) restorable/minimizable so it is easier to work with developer windows.

Ctrl+F1

Open global search pane

Alt+F5

Toggle the docking status of a docking window

Alt+F6

Move to the next docked window

Alt+Shift+F6

Move to the previous docked window

Ctrl+F6

Move to the next MDI window

Ctrl+Shift+F6

Move to the previous MDI window

Ctrl+Shift+V

Open “Version control parameters” form

Ctrl+W

Open a new workspace

F11

Focus the Address Bar in edit mode (works from anywhere)

Alt+Left Arrow

Shortcut for the Back button on the Address bar

Alt+Right Arrow

Shortcut for the Forward button on the Address bar

From AreaPage, ListPage or developer (MDI) window

 

Alt+M

Show the Microsoft Dynamics AX Command Bar

Alt+W

Show Windows menuHint: do this then press “a” to close all windows.

Alt+V

Show View menu

Alt+H

Show Help menu

Alt

Show KeytipsPress the corresponding key to navigate directly to ActionPaneTab/Group/Button

There may be one or more ActionPaneTabs/Groups/Buttons with the same letter for a Keytip.  To execute a duplicate Keytip, keep pressing the letter until focus is on the one you want and then hit Enter.

Standard Forms 

Accelerator Keys

Task Description

Ctrl+N

Create a new record

Ctrl+S

Save current record

Alt+F9

Delete record(s)

Ctrl+F4

Close the active window (saving changes)

Esc or

Ctrl+Q

Close the active window (cancelling changes)

Alt+F4

Close the active window from SDI form (saving changes), Close the application from the main window

Ctrl+P

Print auto-report associated with current form

Ctrl+A

Select all rows in the currently active data source (works regardless of whether you are in a grid or not)

Alt+Down Arrow

Drops down a lookup field or drop-down-list

Ctrl+Alt+F4 or

Menu + G

Go to Main Table Form

F10

Activate the form’s menu bar (File, Edit, etc.)

Enter or Tab

Move to the next fieldEnter will skip over buttons and will move to fields across tabs.

Tab will navigate to buttons and will always stay on the same tab page.

Shift+Enter or Shift+Tab

Move to the previous field (same caveats as previous row)

Ctrl+Shift+Home

Go to the first entry field in the form

Ctrl+Shift+End

Go to the last entry field in the form

Ctrl+Page Up

Go to the previous field group

Ctrl+Page Down

Go to the next field group

Shift+F10

Open context menu for current field

Page Up

Move to the previous page of records

Page Down

Move to the next page of records

Ctrl+Home

Move to the first record

Ctrl+End

Move to the last record

F5

Refresh all data sources on the current form

Ctrl+F5

Restore only the active record

Filtering Commands

Accelerator Keys

Task Description

Ctrl+F

Find by Field (clears previously applied filters)

Ctrl+K

Filter by Field (appends to previously applied filters)

Alt+F3

Filter by Selection

Ctrl+F3

Open Advanced Filter window

Ctrl+Shift+F3

Clear all filters

Within a Grid

 

Ctrl+G

Enable/Disable Filter by Grid

Ctrl+Up Arrow

From a grid cell, move focus to the Filter by Grid input cell for that column (Filter by Grid must be enabled)

On a ListPage

 

Shift+F3

Focus the Quick Filter (“Type to filter” area)

Focus in Quick Filter

 

Enter

Execute/Clear Quick Filter

Down Arrow

Drop down the Quick Filter’s Field Chooser menu

Actions Specific to Grids 

Accelerator Keys

Task Description

Ctrl+E

Export to Excel (only contents of grid)

Ctrl+C

Copy:1)      If Single cell is selected, copies just that cell contents

2)      If the entire row is selected or multiple rows are selected, copies values for ALL fields on all the rows (including those off the grid)

Up/Down Arrow

Move focus to the next/previous record, unselecting the current record

Ctrl+Up/Down Arrow

Move focus to the previous/next record, leaving the current record marked and not marking the newly focused record

Shift+Up/Down Arrow

Move focus to the previous/next record, leaving the current record marked and marking the newly focused record

Ctrl+Shift+Home/End

Mark all records between the currently selected record and the first/last record

Editable Grids

 

Shift+Space

Mark the current record, leaving previously marked records marked.

Read-only Grids(such as on a ListPage)

 

Enter

Execute default action (only on ListPage grids, usually opens the corresponding details form for selected record)For, Non-ListPage forms, Enter will move to the next field

Left Arrow

Move focus one field to the left.  If focus is already in the left-most column, hitting Left Arrow will “mark” the row.

Right Arrow

Move focus one field to the right.

Ctrl+Space

Mark the current record, leaving previously marked records marked.

Shift+Space

Mark all records between the current record and the top-most marked record (or the top record if none are marked), leaving previously marked records marked.

Shift+Page Up/Page Down

Mark all records between the currently selected record and the previous/next page of records.

 

AOT

Accelerator Keys

Task Description

Ctrl+D

Open the AOT

Ctrl+Shift+P

Open the Projects window

Ctrl+ O  orMenu + O

Context: DescriptionJob: Execute the job

Class: Run the main(Args) method

Form: Launch the form

Report: Run the report

Table: Launch Table Browser for this table

Menu + W

Open new AOT window, with only the current node

Ctrl+N

Create a new object

Enteror

Ctrl+Shift+F2

Edit an object

Ctrl+S

Save current object

Ctrl+Shift+S

Save all modified objects

Delete

Delete current object

F2

Rename current object

Menu + R

Restore the state of the current object from disk, cancelling any pending changes

Ctrl+Shift+I

Import one or more application objects from a file

Menu + X

Export the current node to an XPO

F7

Compile

Ctrl+P

Print the active application object (basically XPO contents)

Alt+Enter

Open the property sheet

Ctrl+F

Find window

Ctrl+G

Compare different versions of the application object

Alt+Left Arrow

Move the object to the level of its current parent node in the tree

Alt+Right Arrow

Make the current object a child of the nearest container above it in the tree

Alt+Up Arrow

Move the object one slot up in its current level of the tree

Alt+Down Arrow

Move the object one slot down its current level of the tree

Number Pad *

Expand all sub-trees under this node

Shift+F9

View breakpoints

Ctrl+Shift+F9

Remove all breakpoints

Source Control

 

Alt+I

Check the application object into the version control system

Alt+O

Check out the application object for editing

Alt+U

Undo check out

Code Editor 

Accelerator Keys

Task Description

Ctrl+N

Create a new method/job

Ctrl+S

Save current method/job

F5

Context: DescriptionJob: Execute the job

Class: Run the main(Args) method

Form: Launch the form

Report: Run the report

Ctrl+F

Find and Replace (Find tab focused)

Ctrl+H

Find and Replace (Replace tab focused)

F3

Repeat the last find

Ctrl+G

Go to the specified line

F4

Go to the next error/warning/task

F9

Insert or remove a breakpoint

Ctrl+F9

Enable or disable a breakpoint

Shift+F9

View breakpoints

Ctrl+Shift+F9

Remove all breakpoints

Ctrl+Space

List properties and methods for the selected object

Ctrl+Alt+Space

Lookup a selected label or text

Ctrl+Shift+Space

Go to the definition of the selected method

F2

List all tables

Ctrl+T

List all Extended Data Types

F11

List all enums

F12

List all classes

Shift+F2

List language-reserved words

Shift+F4

List built-in functions

Alt+R

Open the “Scripts” context menu

F6

Close the current tab discarding all changes since last save

F8

Close, and save the current tab

Ctrl+L

Delete the current line

Ctrl+Shift+L

Delete from cursor to the end of the line

Selection Modes

 

Alt+A

“Select Area” – Area Selection Mode – clicking and selecting an area in the editor occurs as in typical editors (default setting)

Alt+O

“Select Columns” – Block Selection Mode – clicking and selecting an area will do so in a rectangle starting from the initial mouse cursor position (entire lines are not selected)

Alt+L

“Select Lines” – Line Selection Mode – clicking a line will select the entire row, clicking and selecting an area will always select the entire lines.

Alt+U

“Undo Selection” – Unselect the current selection.

 Debugger

Accelerator Keys

Task Description

F5

Go

Shift+F5

Stop

F11

Step into function calls

F10

Step over function calls

Ctrl+F11

Step out of the function

Ctrl+F10

Run to cursor

Ctrl+Shift+F10

Set next statement

Alt+Number Pad *

Show next statement

Shift+F9

View breakpoints

F9

Insert or remove a breakpoint

Ctrl+F9

Enable or disable a breakpoint

Ctrl+Shift+F9

Remove all breakpoints

Ctrl+Alt+Line

Show/hide line numbers

Ctrl+Alt+V

View variables

Ctrl+Alt+C

Display the call stack

Ctrl+Alt+O

View output

Ctrl+Alt+B

View breakpoints

Ctrl+Alt+W

View watch

Ctrl+Alt+M

Toggle workbook mode

Ctrl+Alt+D

Restore default layout

Ctrl+F4

Close window

Ctrl+Shift+F4

Close all windows

Ctrl+F6

Next window

Ctrl+Shift+F6

Previous window

During code execution

 

Ctrl+Break

Break execution of currently running script.To open the debugger where the execution is stopped, when the “Are you sure that you want to cancel this operation?” dialog comes up, hold SHIFT and click the No button.

Step by Step Guide How to Install Dynamics AX 2012 Reporting Extension and Analysis Extensions

Imparted from here

 

INSTALL REPORTING EXTENSIONS


Run Pre-Requisite Validation



Go to the Link below and Download Cumulative Update 3 for SQL Server 2008 R2
http://support.microsoft.com/?kbid=2261464








Troubleshooting Tip (SSRS Errors)

Error during Install of AX 2012 SSRS Extensions

Microsoft.ReportingServices.WmiProvider.WMIProviderException: The profile for the user is a temporary profile. (Exception from HRESULT: 0x80090024)  

at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.ThrowOnError(ManagementBaseObject mo)

   at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.ReencryptSecureInformation()

   at ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.ReencryptSecureInformation()

An error occurred during setup of Reporting Services extensions.

Reason: Unable to restore the SQL Server Reporting Services encryption key. The operation failed with error code 2148073508

Solution



a. Restart the box


b. In SQL Server 2008, SSRS Reporting Configuration Manager, Under Encryption Keys, Restore the key


c. Generate Backup encryption key for the service account


d. Check you are able to browse Report Server and Report Manager URL


e. Now, Install SSRS Extensions again, it should work


Deploy Reports (Powershell)



Wait for a few mins to populate the variable, it will return back to the PS Prompt
TIP - You can also output to a file by appending out-file as shown


803 SSRS reports out of the box
Publishing reports
Note – takes around 45 mins to deploy (with some warnings which can be ignored I guess)



INSTALL/CONFIGURE ANALYSIS SERVICES

  1. Install SQL Server Analysis
  2. Restart Server











Installing SharePoint Server 2010 on Windows 7 x64

 

Imparted from here

Introduction

If you wanted to install WSS v3 / MOSS 2007 on your client OS, you had to use all sorts of tricks and tools.
There was this tool from Bamboo Solutions.

But now, you can simply install SharePoint Server 2010 on your client OS just by modifying a config file.

Requirements

  • Process Explorer (Download)
  • SharePoint Server 2010 Beta installer (I used en_sharepoint_server_2010_beta_x64_x16-19249.exe)
  • Windows 7 x64 as client OS

Installation

Ok, let's start up the SharePoint installer and you'll get the following error when trying to install SharePoint:

It seems that SharePoint Server 2010 is only compatible with Windows Server 2008 x64. But it's not.
Ok, start up Process Explorer while the installer splashscreen is running and you'll see the following:

setup_path.png

So it seems that the installer was unpacked in C:\Program Files (x86)\MSECache\oserver2010. You can browse to that directory now.

  • Go to C:\Program Files (x86)\MSECache\oserver2010
  • Go to the Files folder
  • Go to the Setup folder
  • Open config.xml
  • Add the following line before the closing </configuration> tag

Collapse | Copy Code

<Setting Id="AllowWindowsClientInstall" Value="True"/>

Once you've modified the config file, you'll be able to install SharePoint Server 2010 on your Windows 7 machine!
Now you can have your development environment without even dual booting with Server 2008.