Leader Board

Showing posts with label Dynamics AX. Show all posts
Showing posts with label Dynamics AX. Show all posts

How to add new action under Context menu in Dynamics AX

Each node in the AOT contains a set of available actions. You can access these actions from the
context menu, which you can open by right-clicking any node.
You can create custom actions for any element in the AOT by enlist a class as a new add-in by following:
1. Create a new menu item and give it a meaningful name, a label, and Help text.
2. Set the menu item’s Object Type property to Class.
3. Set the menu item’s Object property to the name of the class to be invoked by the add-in.
4. Drag the menu item to the SysContextMenu menu.
5. If you want the action available only for certain nodes, you need to modify the verifyItem
method on the SysContextMenu class.

How to post PO by Code in Dynamics AX

I have task to integrate Dynamics AX with another application by posting PO from out side Dynamics AX, so I used AIF and build new web service to be used from out of AX and call the method below to post PO (packing slip, or invoice) .
public str CreatePostProductReceipt(PurchId _PurchId, Num _PackingSlip, ItemId  Itemid, Qty qty,
InventSiteId  InventSiteId ='', InventLocationId  InventLocationId= '' , inventBatchid batchid = '', InventSerialId  serialId = '', inventsizeId inventsizeId ='', InventColorId InventColorId ='')
{
PurchFormLetter             purchFormLetter;
PurchParmUpdate             purchParmUpdate;
PurchParmTable              purchParmTable;
PurchParmLine               purchParmLine;
PurchTable                  purchTable;
PurchLine                   purchLine;
PurchId                     purchId;
Num                         packingSlipId;
InventDim                   inventDim;
str                 ret='';
System.Exception    err;
;
packingSlipId   = _PackingSlip;
purchTable      = PurchTable::find(_PurchId);
ttsBegin;
try
{
// Create PurchParamUpdate table
purchFormletter = PurchFormLetter::construct(DocumentStatus::PackingSlip); // to post invoice change to DocumentStatus::invoice
purchFormLetter.createParmUpdate(true);
purchParmUpdate = PurchFormLetter.purchParmUpdate();
// Set PurchParmTable table
purchParmTable.clear();
purchParmTable.TransDate                = SystemDateGet();
purchParmTable.Ordering                 = DocumentStatus::PackingSlip;
purchParmTable.ParmJobStatus            = ParmJobStatus::Waiting;
purchParmTable.Num                      = packingSlipId;
purchParmTable.PurchId                  = purchTable.PurchId;
purchParmTable.PurchName                = purchTable.PurchName;
purchParmTable.DeliveryName             = purchTable.DeliveryName;
purchParmTable.OrderAccount             = purchTable.OrderAccount;
purchParmTable.CurrencyCode             = purchTable.CurrencyCode;
purchParmTable.InvoiceAccount           = purchTable.InvoiceAccount;
purchParmTable.ParmId                   = purchParmUpdate.ParmId;
purchParmTable.insert();
// Set PurchParmLine table
while select purchLine
where purchLine.PurchId == purchTable.purchId && purchline.ItemId == Itemid
{
purchParmLine.InitFromPurchLine(purchLine);
inventDim = purchline.inventDim(true);
// Set batch and serial number
if(InventSiteId != '')
inventDim.InventSiteId = InventSiteId;
if(InventLocationId != '')
inventDim.InventLocationId = InventLocationId;
if(batchid != '')
inventDim.inventBatchId = batchId;
if(serialid != '')
inventDim.inventSerialId = serialID;
if(inventsizeId != '')
inventDim.inventsizeId = inventsizeId;
if(InventColorId != '')
inventDim.InventColorId = InventColorId;
purchParmLine.InventDimId = inventDim::findOrCreate(inventdim).inventDimId;
purchParmLine.ReceiveNow    = 1 ; //PurchLine.PurchQty;
purchParmLine.setInventReceiveNow();
purchParmLine.ParmId        = purchParmTable.ParmId;
purchParmLine.TableRefId    = purchParmTable.TableRefId;
purchParmLine.setQty(DocumentStatus::PackingSlip, false, true);
purchParmLine.setLineAmount();
purchParmLine.insert();
}
ttsCommit;
purchFormLetter = PurchFormLetter::construct(DocumentStatus::PackingSlip);
purchFormLetter.transDate(systemDateGet());
purchFormLetter.proforma(false);
purchFormLetter.specQty(PurchUpdate::PackingSlip);
purchFormLetter.purchTable(purchTable);

// This is the ID we hard code as the product receipt ID, if we do the posting via UI
// user would have the option to manually enter this value
purchFormLetter.parmParmTableNum(purchParmTable.ParmId);
purchFormLetter.parmId(purchParmTable.ParmId);
purchFormLetter.purchParmUpdate(purchparmupdate);
purchFormLetter.run();
return "OK";
}
catch (Exception::CLRError)
{
err = CLRInterop::getLastException();
ret = err.ToString();
return ret;
}
Return "Error";
}

How to Call Report from Dynamics AX 2009

After you created your report in AX you can call report from  AX form by follow the below steps:

1- Create menu item with type output by drag and drop report to MenuItems nodes under AOT.

2- Open the form that you need to call report from.

                  Note: the form should be have dataSource with the table in report

3-  Drag and Drop menu Item created in step 1 in the form under any button group.

4- Add the following method to Report

void initFromCaller(Args _args)
{
    str                   QrderId; // field used as Rang and used to filter data
    QueryBuildDataSource  qbds; // should be represent report datasource and selected record in the form

    ;

    if (! _args ||
        ! _args.caller() ||
          _args.dataset() != tablenum(TableName) )
        return;

    QrderId = _args.record().(fieldnum(TableName,FieldName));

    qbds    =  element.query().dataSourceTable(tablenum(TableName));

    if(!qbds.findRange(fieldnum(TableName,FieldName)))
    {
        qbds.addRange(fieldnum(TableName,FieldName)) ;
    }
    qbds.findRange(fieldnum(TableName,FieldName)).value(queryvalue(QrderId));

}

Inventory Closing slow

May The below link lead you to solve Dynamics ax closing slowness issue by creating new indexes in the main tables used in the recalculation and closing process in Dynamics ax.

Inventory Closing slow:

Performance considerations for number sequences in Dynamics AX

Consider the following information about how the configuration of number sequences can affect system performance before you set up number sequences.

Continuous and non-continuous number sequences

Number sequences can be continuous or non-continuous. A continuous number sequence does not skip any numbers, but numbers may not be used sequentially. Numbers from a non-continuous number sequence are used sequentially, but the number sequence may skip numbers. For example, if a user cancels a transaction, a number is generated, but not used. In a continuous number sequence, that number is recycled later. In a non-continuous number sequence, the number is not used.

Continuous number sequences are typically required for external documents, such as purchase orders, sales orders, and invoices. However, continuous number sequences can adversely affect system response times because the system must request a number from the database every time that a new document or record is created.

If you use a non-continuous number sequence, you can enable Preallocation on the Performance FastTab of the Number sequences form. When you specify a quantity of numbers to preallocate, the system selects those numbers and stores them in memory. New numbers are requested from the database only after the preallocated quantity has been used.

Unless there is a regulatory requirement that you use continuous number sequences, we recommend that you use non-continuous number sequences for better performance.

Automatic cleanup of number sequences

In case of a power failure, an application error, or other unexpected failure, the system cannot recycle numbers automatically for continuous number sequences. You can run the cleanup process manually or automatically to recover the lost numbers.

Carefully consider server usage when you plan the cleanup process. We recommend that you perform the cleanup as a batch job during non-peak hours.

Recalculation Error Dynamics AX 2009

while running inventory recalculation process, I got this error

“Cannot edit a record in stock transactions (InventTrans) An update
conflict occurred due to another user process deleting the record or changing
one or more fields in the record"

solution to avoid this error, go to AOT –> DataDictionary –> Tables ----> InventTrans

right click on table to display properties window then change OccEnabled property to No.

then resume recalculation again, it will work successfully.

image

Description of the main processing steps that are performed by the Inventory Close and the Inventory Recalculation in Dynamics AX

When you run the Inventory Close routine or the Inventory Recalculation routine in Microsoft Dynamics AX, Microsoft Dynamics AX performs a sequence of steps in their processing.

Steps that are performed by the Inventory Close routine
When you run the Close routine, Microsoft Dynamics AX performs the following steps:
  1. Check whether any Recalculations were run after the date that you choose for your Close. Microsoft Dynamics AX will cancel any of those later Recalculations before the Close can start.
  2. Put all the items that are to be processed into a queue. These items are stored in the InventCostList table.
    Note While a Close or Recalculation is processing, you can click Calculation/Calculation List from the Close & adjustment form to view the data in the InventCostList table. This shows which items are still to be processed by the Close or Recalculation process.
  3. Process each item from that queue sequentially. Microsoft Dynamics AX performs the following for each item:
    1. Settle individual receipts and issues against one another for the item according to the Inventory Model Group such as FIFO, Weighted Average.
      • Make any required cost adjustments to the issue that was settled based on the cost of the receipt(s) against which the issue was settled.
      • Update the inventory transactions to show the settlement and cost adjustment data.
      • Write the settlement data into the Inventory Settlement table. The data will include records that show explicitly which Receipt(s) were settled to each Issue in addition to any cost adjustment that is made to the Issue that is settled.
    2. As soon as all possible transactions are processed for that item, Microsoft Dynamics AX looks for any transactions that are fully settled, and then update those transactions to "Closed." For more information, see the "What fields show that an inventory transaction is closed" section.
  4. As soon as all the items are processed, the settlement records that were created are read and sorted by General Ledger Account. Then, Microsoft Dynamics AX summarizes all the cost adjustments that were made, and a General Ledger Journal is created and posted.
  5. If you select the Run recalculation after closing check box in the Close dialog box, a Recalculation will be run for all items up to today's date.
Steps that are performed by the Inventory Recalculation routine
The Inventory Recalculation routine does a similar job to the Inventory Close routine. However, there are a few differences. When you run the Recalculation routine, Microsoft Dynamics AX performs the following steps:
  1. Check whether any Recalculations were run after the date that you choose to run your Recalculation up to. Microsoft Dynamics AX will cancel any of those later Recalculations found before your Recalculation routine can start.
    Notes
    • In the Select dialog box, you can select item(s) for which you want to run the Recalculation, unlike the Close routine that always processes all items.
    • While a Recalculation or Close is processing, you can click Calculation/Calculation List from the Close & adjustment form to view the data in the InventCostList table. This shows which items are still to be processed by that Close or Recalculation.
  2. Put all the items that are to be processed into a queue, and then store the queue in the InventCostList table.
  3. Process each item from that queue sequentially. Microsoft Dynamics AX performs the following for each item:
    • Make a "virtual" settlement between individual receipts and issues for the item according to the Inventory Model Group such as FIFO, Weighted Average. This is a "virtual" settlement because it is occurs in the Recalculation’s calculations. However, the detailed settlement data that shows the explicit matching of each issue to the various receipts is not stored in the InventSettlement table. The only data that is stored is the cost adjustment that is made to the issue.
      • Make any required cost adjustments to the issue that was settled based on the cost of the receipt(s) against which the issue was settled.
      • Write a single settlement record for any cost adjustment that is made for that Issue into the Inventory Settlement table.
  4. As soon as all the items are processed, the cost adjustment settlement records that were created are read, sorted by General Ledger Account, and summarized and posted in a General Ledger Journal.
What fields show that an inventory transaction is closed
To show that an inventory transaction is "closed", Microsoft Dynamics AX performs the following:
  1. When the Inventory Close routine has fully settled the Quantity and Financial Cost of a specific inventory transaction, Microsoft Dynamics AX updates the individual inventory transaction to show that the transaction is "closed."
  2. For a transaction to be closed, it must meet the following criteria:
    • The "Quantity" must match the "Quantity Settled."
    • The sum of "Cost Amount Posted" plus "Cost Amount Adjustment" must match the "Cost Amount Settled."
  3. When those conditions are met, then the Close program will do the following:
    • Set the field "Value Open" from "Yes" to "No."
    • Store the date of the close in the field "Date Closed."
    This means that the individual inventory transaction is "closed."

Common Keys Steps for The Planning integration process Between AX and Other Applications

1. In a typical integration scenario, users who have business expertise first determine the document exchange needs. These are requirements from a business perspective. The business users work with the Implementation team to specify:
a. What data is to be exchanged.
b. Any business logic related to that data.
c. The external systems with which data is to be exchanged.
d. The conditions under which data is sent from or received by Microsoft Dynamics AX.


2. The partner or system implementer works with the customer and their IT staff to determine the hardware and software requirements for AIF. They analyze the existing environment and recommend any new hardware or software that must be installed.


3. The customer's IT staff installs and configures any required hardware and software to support AIF.

4. The partner or customer developer programs the document exchange. They can make customizations to the AIF documents or create new documents to meet the requirements of the business users. How AIF is configured depends in part on the network environment. Therefore, the developer may work with IT staff when implementing an integration scenario.

5. IT staff monitors the document exchanges and troubleshoot any errors that are generated.

Dynamics AX Build numbers

The build version numbers are split into three parts. First the client version number is listed, followed by the application version. Formatted like: Build #client version/application version/localization versions.

Contents

  • Dynamics AX 2012 R3
  • Dynamics AX 2012 R2
  • Dynamics AX 2012
  • Dynamics AX 2009
  • Dynamics AX 4.0
  • Axapta 3.0

Dynamics AX 2012 R3

Build number

Version

6.3.126.8

2012 R3 CTP5

6.3.42.13

2012 R3 CTP4

Dynamics AX 2012 R2

Build number

Version

6.2.158.0

2012 R2

6.2.1000.156

2012 R2 Cumulative Update 1 (CU1)

6.2.1000.1437

2012 R2 Cumulative Update 6 (CU6)

6.2.1000.4051

2012 R2 Cumulative Update 7 (CU7)

Dynamics AX 2012

Build number

Version

6.0.852.78

2012 Beta

6.0.947.0

2012 RTM

6.0.947.61

2012 Cumulative Update 1 (CU1)

6.0.947.280

2012 Cumulative Update 2 (CU2)

6.0.947.862

2012 Feature Pack

6.0.1108.670

2012 Cumulative Update 3 (CU3)

6.0.1108.2423

2012 Cumulative Update 4 (CU4)

6.0.1108.4316

2012 Cumulative Update 5 (CU5)

Dynamics AX 2009

Build number

Version

RPC interface version

5.0.593.0

2009 RTM

50444.0 (C50C.0000)

5.0.593.439

2009 Hotfix Rollup 1 (RU1)

N/A

5.0.593.662

2009 Hotfix Rollup 2 (RU2)

N/A

5.0.593.827

2009 Hotfix Rollup 3 (RU3)

N/A

5.0.593.1084

2009 Hotfix Rollup 4 (RU4)

N/A

5.0.593.1287

2009 Hotfix Rollup 5 (RU5)

N/A

5.0.593.1429

2009 Hotfix Rollup 6 (RU6)

N/A

5.0.1000.52

2009 SP1

50444.0 (C50C.0000)

5.0.1500.358

2009 SP1 Hotfix Rollup 1 (RU1)

50444.0 (C50C.0000)

5.0.1500.809

2009 SP1 Hotfix Rollup 2 (RU2)

50444.0 (C50C.0000)

5.0.1500.1313

2009 SP1 Hotfix Rollup 3 (RU3)

50444.0 (C50C.0000)

5.0.1500.2116

2009 SP1 Hotfix Rollup 4 (RU4)

50444.0 (C50C.0000)

5.0.1500.2985

2009 SP1 Hotfix Rollup 5 (RU5)

50444.0 (C50C.0000)

5.0.1500.3761

2009 SP1 Hotfix Rollup 6 (RU6)

50444.0 (C50C.0000)

5.0.1500.4570

2009 SP1 Hotfix Rollup 7 (RU7)

50444.0 (C50C.0000)

5.0.1500.6491

2009 SP1 Hotfix Rollup 8 (RU8)

50444.0 (C50C.0000)

Dynamics AX 4.0

Build number

Version

RPC interface version

4.0.1659.26

4.0 RTM

41638.0 (A2A6.0000)

4.0.1659.35

4.0 RTM (localized)

N/A

4.0.2163.0

4.0 SP1

42060.0 (A44C.0000)

4.0.2500.XXX

4.0 SP1 DIS layer hotfixes

42060.0 (A44C.0000)

4.0.2501.116

4.0 SP2

42060.0 (A44C.0000)

4.0.2503.XXX

4.0 SP2 DIS layer hotfixes

42060.0 (A44C.0000)

Axapta 3.0

Build number

Client version

AOCP version

1951.8

3.0

N/A

1951.17

3.0 SP1

60029 (0xEA7D)

1951.18

3.0 SP1

N/A

1951.2410

3.0 SP2

60031 (0xEA7F)

1951.2411

3.0 SP2 Hotfixed

60031 (0xEA7F)

1951.3730

3.0 SP3

60031 (0xEA7F)

1951.3733

3.0 SP3 Hotfixed

60031 (0xEA7F)

1951.4060

3.0 SP4

60031 (0xEA7F)

1951.5160

3.0 SP5

61031 (0xEE67)

1951.6710

3.0 Kernel Rollup 1

61031 (0xEE67)

1951.7500

3.0 Kernel Rollup 2

63031 (0xF637)

1951.7609

3.0 Kernel Rollup 3

63031 (0xF637)

Build number

Application version

514-90

3.0 SP2

514-193

3.0 SP3

514-320

3.0 SP4

514-513

3.0 SP5

514-859

3.0 SP6

Deploy reports for the new Reporting Services instance [AX 2012]

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Microsoft Dynamics AX includes many default reports that you must deploy. You can deploy these reports by using Windows PowerShell. The following procedures can help you deploy the reports.

Before you begin

Before you can deploy the reports by using Windows PowerShell, you must complete the following tasks:

  • Verify that Windows PowerShell 2.0 is installed on the computer that you are using.

  • Verify that your Windows domain account is a member of the Administrators group on the server that is running Microsoft SQL Server Reporting Services.

    NoteNote

    If your Windows domain account is assigned to a group that is a member of the Administrators group, it may take some time to validate that you are a member of the Administrators group. If you experience a delay when you deploy reports, consider adding your Windows domain account directly to the Administrators group.

  • If Reporting Services is running in native mode, verify that you are assigned to the System Administrator role on the Report Manager website.

  • If Reporting Services is running in SharePoint integrated mode, verify that you have been granted Contribute permission to the document library where you plan to deploy the reports.

    NoteNote

    SharePoint integrated mode is supported if you are using Microsoft Dynamics AX 2012 R2.

Open Windows PowerShell and view a list of reports

Complete the following procedure to open Windows PowerShell and view a list of the reports that are included with Microsoft Dynamics AX.

  1. Open Windows PowerShell as an administrator by following these steps.

    1. Click Start > Administrative Tools.

    2. Right-click the Microsoft Dynamics AX 2012 Management Shell option.

    3. Click Run as administrator.

  2. Retrieve a list of the reports that are included with Microsoft Dynamics AX, and store the list in a local variable by entering the following command:

    Windows PowerShell

    $reports = Get-AXReport -ReportName *

    For more information about the Get-AXReport command, see Get-AXReport.



  3. View the list of reports by entering the following command:

    Windows PowerShell

    $reports

Filter the list of reports


In the previous procedure, you displayed a list of all the reports that are included with Microsoft Dynamics AX. To modify and filter the list, you can use the following commands.



  • To modify the list so that only the Name and ChangedDate fields are displayed, enter the following command:

    Windows PowerShell

    $reports | Select-Object Name,ChangedDate


  • To filter the list so that only specific reports are listed, enter keywords or report names. For example, to filter the list so that only reports that contain the word CustTrans are listed, enter the following command:

    Windows PowerShell

    $reports | Select-Object Name,ChangedDate | Where { $_.Name -like "CustTrans*" }

Deploy the reports


After you have retrieved a list of reports, you can deploy the reports. The Publish-AXReport command is used to deploy the reports. The following examples show how to use this command. For more information, see Publish-AXReport.

NoteNote

In the following examples, SSRSConfigID refers to a configuration ID that was defined in Microsoft Dynamics AX. To view these configuration IDs, open Microsoft Dynamics AX and then open the Report servers form. (ClickSystem administration > Setup > Business intelligence > Reporting Services > Report servers.) To deploy reports to the new Reporting Services instance, enter the configuration ID that is associated with that instance.



  • To deploy a specific report, enter the name of the report. For example, to deploy the CustTransList report, enter the following command:

    Windows PowerShell

    Publish-AXReport –Id SSRSConfigID -ReportName CustTransList


  • To deploy two or more specific reports, enter the names of the reports. For example, to deploy the CustTransList and CustTransOpenPerDate reports, enter the following command:

    Windows PowerShell

    Publish-AXReport –Id SSRSConfigID -ReportName CustTransList, CustTransOpenPerDate


  • To deploy all reports, enter the following command:

    Windows PowerShell

    Publish-AXReport –Id SSRSConfigID –ReportName *

Install Microsoft Dynamics AX in Silent Mode

When you run the Setup wizard, Setup is running in interactive mode. This means a graphical user interface (GUI) prompts you for required information.
Alternatively, you can run Setup in silent mode, with no GUI displaying. In this mode, required information is supplied at the command prompt or in a parameter file. You can install any Microsoft Dynamics AX component in silent mode.
NOTE: A silent installation is especially useful when deploying multiple clients at one time.

Deploy Multiple Clients
To deploy multiple Microsoft Dynamics AX Windows clients at one time, it is recommended that you use the following process.
1. Copy the contents of the Microsoft Dynamics AX DVD to a shared directory on the network.
2. Create a common configuration file in a shared directory on the AOS computer that clients will connect to.
3. Create a batch file to install clients with a shared configuration. The file must be located in a shared directory in  the Microsoft Dynamics AX DVD shared folder, at the same level as Setup.exe.
4. Test the batch file on a local computer.
5. Use a mass deployment tool such as Group Policy or Microsoft Systems Management Server to run the batch file from a logon script.

For more information about using Group Policy to deploy software, refer to: http://go.microsoft.com/fwlink/?LinkId=92736.
For more information about using Systems Management Server to deploy software, refer to: http://go.microsoft.com/fwlink/?LinkId=115327.
The following procedures contain more detailed information about creating a shared configuration file and creating a command file.

 

Determine Which Parameters to Use
The same parameters are available whether you enter them at the command prompt or create a parameter file. For information about individual parameters, refer to the Setup parameters reference (http://go.microsoft.com/fwlink/?LinkId=191476) on TechNet.
To determine which parameters to use, it is recommended that you install a client on a single computer and then review the Setup log file, which is located at <Drive>\Program Files\Microsoft Dynamics AX\Dynamics AX\60\Setup
logs\Date Time\DynamicsSetupLog.txt. The log lists the parameters used in the installation.

Specify Installation Parameters at the Command Prompt
Use the following procedure to run the installation by entering parameters at the command prompt.
1. Open a Command Prompt window.
2. At the command prompt, type the following information: <Path to DVD or shared directory>\Setup.exe parameter1="value" parameter2="value". When using multiple parameters, insert a single space between parameters.
WARNING: If you enter duplicate parameters, Setup will fail silently.
3. After you have listed all parameters, press Enter.

Specify Installation Parameters Using a Parameter File
Use the following procedure to run the installation by specifying a parameter file at the command prompt.
1. Create a text file that lists the appropriate installation parameters and their values. In the parameter file, the Name=Value combination for each parameter must be on a separate line.
WARNING: If you enter duplicate parameters, Setup will fail silently.
2. Do not include double quotation marks in parameter files. Because a line return is used as a delimiter in a parameter file, values that otherwise require the use of double quotation marks do not require them here. To prevent a line in a parameter file from being read, type a number sign (#) before the line. The line will be treated as a
comment rather than a command or parameter.
3. Open a Command Prompt window.

4. At the command prompt, type the following information: <Path to DVD or shared directory>\Setup.exe ParmFile=<path to file\FileName.txt>. The path can be fully qualified or relative to the location of the Setup.exe file. Relative paths can include upward qualifiers such as "..\..\".
5. Press Enter.

NOTE: To set up clients to use a shared configuration file, set the ClientConfigFile path parameter to the file in the shared directory. ClientConfigFile="X:\<name of configuration file>.axc"

Sample Parameter File
The following is an example of a parameter file that can be used to install the databases and the Application Object Server (AOS). Your parameter file will vary, based on the components that you are installing.
HideUI=1
AcceptLicenseTerms=1
DbSqlServer=SQLServerName
DbSqlDatabaseName=DatabaseName
InstallApplication=1
ApplicationInstanceName=ApplicationInstanceName
InstallAos=1
AosInstanceName=AOSInstanceName
AosApplicationPath="C:\Program Files\Microsoft Dynamics AX\60"
AosReportErrors=0

Procedure: Create a Group Policy Logon Script
To install clients using Group Policy, follow these steps:
1. Open Start > Administrative Tools > Group Policy Management.
2. Expand Group Policy: Management > Forest: Contoso.com > Domains > Contoso.com.
3. Right click Contoso.com, and select Create a GPO in this domain, and Link it here.

image

4. In the Name field, type "Dynamics AX Logon Script", then click OK.
5. Right-click "Dynamics AX Logon Script", then click Edit.
6. Expand User Configuration > Policies > Windows Settings > Scripts (Logon/Logoff).
7. In the right pane right click Logon, and then click Properties.
8. Click Show Files. This will bring up a file dialog in a logon folder.
9. Right-click the folder and then click New > Text Document to create a new text document in this directory.
10. Double-click the new file to open it in Notepad.
11. Enter the following script and save the file: D:\Setup.exe HideUI=1 AcceptLicenseTerms=1 InstallClientUI=1
ClientAosServer=Company1 ClientLanguage=en-US ClientHelpLanguages=en-US

NOTE: The directory path for Setup.exe should be a network path.

12. Right-click and rename "New Text Document.txt" to "AxInstallClient.cmd", then confirm the change of the file name extension when you are prompted.
13. Close the Windows Explorer menu.
14. Click Add, then click Browse.
15. Select "AxInstallClient.cmd", and then click Open.
16. Click OK.
17. Notice that the script has been added to logon properties, and then click OK.
18. Close Group Policy Management Editor.

NOTE: This setup can be proven by uninstalling the client, look to verify that the client has been removed, logoff the Virtual Machine (VM), logon to the VM, and verify that the client has been reinstalled. It might take several minutes after the logging on for the Microsoft Dynamics AX 2012 to apply.

NOTE: Scripts can also be set to run on the startup and shutdown of a server.

How to: Override the fetch Method to Filter Data for Reports (MorphX Reporting Tools)–AX 2009

You can override the fetch method to filter the data that is displayed in a report. This override does not reduce the number of records that are returned by the query of the report. Instead it prevents some records from being sent to the final report. Each record is examined by the branching logic you add to the fetch method. Branching determines which records to give to the send method. Those records appear in the final report.

Note

Do not call super() when you override the fetch method in a report.

By default, each record that is returned by the query appears in the report. To reduce the number of records returned, add range restrictions to the query. Report ranges are more efficient than overriding the fetchmethod; however, report ranges are less expressive. For information about adding ranges to queries, see Query Elements in the AOT.

Example


The following code example loops through each record that is returned by the query. The code tests a field in each record and branches to a send method call for records that belong in the report.

In this example, the BankAccountTable table is the only data source for the report. The fetch method in the report is overridden with the following code.

public boolean fetch()
{
boolean retCode = false;
BankAccountTable bankAccountTableRec;
QueryRun qrun;
;
// Use the queryRun object that is associated with the
// report; element refers to the report.
qrun = new QueryRun(element);

// Verify that the report dialog works.
if (! qrun.prompt())
{
return retCode;
}

// Loop through each record from the data source query of the report.
while (qrun.next())
{
// Get the BankAccountTable fields from the query record.
bankAccountTableRec = qrun.get(TableNum(BankAccountTable));

// Exclude ODDBANK from the visible report.
if (bankAccountTableRec.AccountID != "ODDBANK")
{
// Include the current record in the report.
element.send(bankAccountTableRec);
}
}
retCode = true;

// retCode = super(); // Do not call super() when you override the fetch method.
return retCode;
}

RAID Subsystem – Very important topics when you implement Dynamics AX

With an Enterprise Resource Planning (ERP) system such as Microsoft Dynamics AX 2012, the database server generally stores a very large amount of important data for the business. If this data is unavailable for any length of time, the business could experience significant financial losses. Using a Redundant Array of Independent Disks (RAID) can help reduce the possibility of this loss from occurring. Another important aspect for a database server is fine tuning for optimal performance. A RAID disk subsystem can also be used to help achieve this goal.

RAID refers to a group of two or more disks managed as a single unit to store the data together with additional, or redundant, information to provide recovery if
there is a disk failure. Usually a failed disk in a RAID system can be replaced while the server is still running. This is one benefit of RAID.

NOTE: More Information on RAID can be found on the Microsoft MSDN web site.

Read/Write Performance:

Hardware RAID controllers divide read/writes of all data from Windows and applications such as Microsoft SQL Server into slices (usually 16 KB - 128 KB) that are spread across all disks participating in the
RAID array. Splitting data across physical drives distributes the read/write Input/Output (I/O) workload evenly across all physical hard disk drives participating in the RAID array. This increases disk I/O performance because the
disks participating in the RAID array are all kept equally busy, instead of some disks becoming a bottleneck because of irregular distribution of I/O requests.

Fault Tolerance: RAID provides protection from hard disk failure and accompanying data loss with two methods: mirroring and parity. There are many types of RAID configurations; each is called a RAID level, but only some RAID
levels are typically used with Microsoft Dynamics AX 2012.

RAID 0
RAID 0, which is not recommended for use with Microsoft Dynamics AX 2012, is typically defined as a group of striped disk drives, without parity or data redundancy. RAID 0 arrays deliver the best data storage efficiency and
performance of any array type.

image

RAID 1
RAID 1 is also known as disk mirroring. This is a pair of disk drives that store duplicate data, but appear to the computer as a single drive. All writes move to both drives of a mirrored pair so that the information on the drives is kept
identical. However, each drive can perform concurrent, independent read operations. Mirroring therefore doubles the read performance of a single nonmirrored drive, while the write performance is unchanged. RAID 1 delivers the
best performance of any redundant array type.

image

RAID 5
RAID 5 is also known as a Rotating Parity Array. RAID 5 works by striping data and parity across all the drives. Typically RAID 5 arrays offer similar read performance as pure striping, although writes are slower because the parity
information is updated every time. If one hard disk fails, it must be replaced with a new one of equal or larger size and it rebuilds from the parity on the remaining drives.

image

RAID 0+1
RAID 0+1, is a dual-level RAID and achieves a balance between the increased data availability of RAID 1, mirroring, and the increased read performance of RAID 0, striping. Do not to confuse RAID 0+1 with RAID 10, they work
differently and RAID 0+1 is what is recommended.

image

For maximum performance configure the database server shown in the following example:
• Two disk RAID 1 for the operating system and database software
• A small, four disk RAID 0+1, or two disk RAID 1 for database logs
• A larger RAID 0+1 for the main database files
o To reduce cost, swap out the RAID 0+1 for a RAID 5. However, this will result in slower performance.

Firewall settings for Microsoft Dynamics AX components [AX 2012]

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

If you use Windows Firewall to help protect your computers, Microsoft Dynamics AX components require the settings in the following table. For more information about Windows Firewall, see the Windows documentation.

Component

Computer

Firewall setting

Notes

Setup

Any

Allow outbound HTTP connections.

To access the documentation that is available from the Setup wizard, you must be able to connect to the Internet from the computer where you are running Setup.

Databases

Database server

Exclude the port that is used by Microsoft SQL Server. By default, SQL Server uses port 1433.

For more information, see the SQL Server documentation.

Application Object Server (AOS)

AOS server

· Exclude the TCP/IP port that is used by the AOS instance. By default, AOS uses port 2712.

Setup automatically creates the inbound rule "Dynamics AX 6.0 –MicrosoftDynamicsAX (RPC)" for the TCP/IP port.

· Exclude the services WSDL port that is used by the AOS instance. By default, AOS uses port 8101.

Setup automatically creates the inbound rule "Dynamics AX 6.0 –MicrosoftDynamicsAX (WSDL)" for the WSDL port.

· Exclude the services endpoint port that is used by the AOS instance. By default, AOS uses port 8201.

Setup automatically creates the inbound rule "Dynamics AX 6.0 –MicrosoftDynamicsAX (NetTCP)" for the services endpoint port.

Windows Firewall must be enabled on the computer. Each AOS instance must use a different port number.

clip_image001Note

By default, every time that you install an additional AOS instance on a computer, the TCP/IP port number and the services endpoint port numbers are incremented by 1. For example, by default, the second AOS instance on a computer is assigned to TCP/IP port 2713.

Client

Client workstation

Exclude Ax32.exe.

The client uses a TCP port to connect to the AOS instance.

Microsoft SQL Server Reporting Services extensions

Report server

Exclude the port that is used by Reporting Services virtual directories, if Reporting Services uses a port other than port 80.

If you are installing Reporting Services extensions in a perimeter network, you may need to add a firewall policy that enables you to connect to the Microsoft Dynamics AX database. For example, if you are using Forefront Threat Management Gateway (TMG), you must add a Non-Web Server Protocol Rule. For more information, seeConfiguring SQL Server publishing in the Forefront TMG documentation.

Microsoft SQL Server Analysis Services integration

Analysis server

· Exclude the port that is used by Analysis Services. By default, Analysis Services uses port 2383.

· If you are using SQL Server Browser, you must also exclude port 2382.

For more information about how to configure access to Analysis Services through Windows Firewall, see the SQL Server documentation on MSDN.

Debugger

Developer workstation

Exclude AxDebug.exe and its target programs, such as Ax32.exe and AxServ32.exe.

The debugger uses a dynamically allocated TCP port.

Enterprise Portal for Microsoft Dynamics AX

Web server

· Enable the Web Server (HTTP).

· Exclude the port that is used by the Enterprise Portal website, if the site uses a port other than port 80.

If you do not enable the Web Server in Windows Firewall, you can view the site only from the local server.

Help Server

Web server

Exclude the port that is used by the Help Server web site, if the site uses a port other than port 80.

 

Enterprise Search

Web server

Exclude the port that is used by the Search web site, if the site uses a port other than port 80.

 

Web services

Web server

Exclude the port that is used by the services web site, if the site uses a port other than port 80.

External programs use this port to consume the Microsoft Dynamics AX web services that are based on Internet Information Services (IIS).

Management utilities

Remotely managed computer

Enable Remote Administration.

You must enable Remote Administration on computers that are administered remotely by using Windows PowerShell. For example, enable Remote Administration on a computer if you deploy reports to that computer from another computer where Windows PowerShell is installed.

Synch Service

Head-office communications server

· Exclude the port that is used by Microsoft SQL Server. By default, SQL Server uses port 1433.

· Exclude the port that is used by Synch Service. By default, Synch Service uses port 16750.

· Exclude the port that is used by Real-time Service. By default, Real-time Service uses port 1239.

For instructions, see the PCI Implementation Guide for Microsoft Dynamics AX 2012 Feature Pack.

Synch Service

Store communications server

· Enable Internet Protocol security (IPsec).

· Exclude the port that is used by Microsoft SQL Server. By default, SQL Server uses port 1433.

· Exclude the port that is used by Synch Service. By default, Synch Service uses port 16750.

For more information, see the PCI Implementation Guide for Microsoft Dynamics AX 2012 Feature Pack.

Real-time Service

 

Exclude the port that is used by Real-time Service, if the site uses a port other than port 80.

For more information, see the PCI Implementation Guide for Microsoft Dynamics AX 2012 Feature Pack.

Retail POS

Store communications server

Exclude the port that is used by Microsoft SQL Server. By default, SQL Server uses port 1433.

Exclude the port that is used by Synch Service. By default, Synch Service uses port 16750.

For more information, see the PCI Implementation Guide for Microsoft Dynamics AX 2012 Feature Pack.

Retail POS

Store database server

Exclude the port that is used by Microsoft SQL Server. By default, SQL Server uses port 1433.

On a register that has its own local database, you only need to open the firewall to SQL Server if Synch Service is on a computer other than the register.

For more information, see the PCI Implementation Guide for Microsoft Dynamics AX 2012 Feature Pack.

Microsoft Dynamics ERP RapidStart Connector

Microsoft Dynamics ERP RapidStart Services host machine

· Exclude the executable file for the Microsoft Dynamics ERP RapidStart Connector service. By default, the file is installed in this location:

%SystemDrive%\Program Files\Microsoft Dynamics AX\60\RapidStartConnectorService\Microsoft.Dynamics.AX.AppConfig.ConnectorLoaderService.exe

· Exclude the endpoint port that is used by the Microsoft Dynamics ERP RapidStart Connector service. By default, the service communicates with the Windows Azure Service Bus on ports 9350-9354, 80, and 443.

· Exclude the Windows Azure Cloud Services Protocols.

 

Dynamics AX 2009 Workflow does not working

I have faced a problem today at my work, the workflow does not working, and there not PR submitted and any incident is Pending.

I checked every thing and restart AOS Service  but my Issue is not fixed, so I checked Windows event log on server that host Workflow services and I got the bellow error.

 

Session log on for Microsoft Dynamics failed.

Dynamics Adapter LogonAs failed.

Microsoft.Dynamics.Framework.BusinessConnector.Session.Exceptions.FatalSessionException
   at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.HandleException(String message, Exception exception, HandleExceptionCallback callback)
   at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsBase.HandleExceptionInternal(String message, Exception e)
   at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsAdapter.LogonAs(String user, String domain, NetworkCredential bcProxyCredentials, String company, String language, String objectServer, String configuration)
   at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsAdapter.Microsoft.Dynamics.Framework.BusinessConnector.Adapter.IAxaptaAdapter.LogonAs(String user, String domain, NetworkCredential bcProxyCredentials, String company, String language, String objectServer, String configuration)
   at Microsoft.Dynamics.Framework.Workflow.BusinessConnector.WorkflowSession.OnLogon(IAxaptaAdapter axaptaAdapter)
   at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.Init(ICacheContext context)

Microsoft.Dynamics.BusinessConnectorNet.LogonFailedException
   at Microsoft.Dynamics.BusinessConnectorNet.Axapta.Logon(BC_PROXY_ACCOUNT_INFO* pBCProxyAccountInfo, String company, String language, String objectServer, String configuration)
   at Microsoft.Dynamics.BusinessConnectorNet.Axapta.LogonUsingBCProxyAccount(_SEC_WINNT_AUTH_IDENTITY_W* pImpersonatedUserAccount, NetworkCredential bcProxyCredentials, String company, String language, String objectServer, String configuration)
   at Microsoft.Dynamics.BusinessConnectorNet.Axapta.LogonAs(String user, String domain, NetworkCredential bcProxyCredentials, String company, String language, String objectServer, String configuration)
   at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsAdapter.LogonAs(String user, String domain, NetworkCredential bcProxyCredentials, String company, String language, String objectServer, String configuration)

Solution:

Restart IIS service on the server.

What makes a good Dynamics AX Project Manager?

The success and failure of Dynamics AX project is directly related to the quality of the project manager leading it. A recent survey of PWC showed that over 85% of dynamics ax project failed to achieve their core objectives – poor project management was one of the root causes.

to complete the post kindly click this link

30 database entity relationship diagrams (ERDs) for tables of Microsoft Dynamics AX 2012 R2

Announcing the AxERD site: Database Entity Relationship Diagrams (ERDs) for Microsoft Dynamics AX 2012
The new "AxERD" website is now online! This site contains about 30 ERDs for the most-used tables in Microsoft Dynamics AX 2012. The AxErd site has all the foreign key information sorted and gathered together in one place. For any table, you can retrieve a list of the child or parent tables with one click. Visit the AxERD site today and let us know what you think: http://go.microsoft.com/fwlink/p/?linkid=296623.

Dynamics AX 2012 - Developing Secure Mobile Apps

Updated Version of "Developing Secure Mobile Apps" White Paper Now Available
This white paper describes how to develop mobile client apps to communicate with Microsoft Dynamics AX 2012 from phone or tablet platforms. Mobile apps can enable a wide variety of business processes, such as submitting expense reports and timesheets, to be conducted from anywhere. This document provides a walkthrough of a sample app for employee expense capture.