Thursday, February 26, 2015

Copying table records between company in Axapta


code snippet for copying all table records from one company to another

static void CopyTable(Args _args)
{

while select * from table1
{
   ttsbegin;

   ChangeCompany('COM2')
   {
        buf2buf(table1, table2);
   }

   table2.insert();
   ttscommit;
}

}

Tuesday, February 17, 2015

AX2012 Warehouse Mobile Devices Portal - Item inquiry


This is a quick 8 steps to inquiry an item quantity in the uspi company of the AX2012 R3 demo data over the warehouse mobile devices portal. Assuming the warehouse mobile device portal has been setup properly.


Go to USPI > Warehouse management > Area page > Setup > Mobile device > Mobile device menu items. Create "Item inquiry" menu item. Choose Indirect as Mode and Item inquiry as Activity code


Go to Warehouse management > Area page > Setup > Mobile device > Mobile device menu
Add menu item "Item inquiry" to the menu


Setup a mobile device login at USPI > Warehouse management > Area page > Setup > Work users > Workers. Create an user Id and reset password if necessary

Add caption
Login the mobile device portal.


You can see the menu item "Item inquiry" newly created in the main menu. Choose "Item inquiry"


Only item enabled with "Uses warehouse management process" is available for inquiry.



Enter the item id, the quantity per inventory dimension is displayed after screen refresh.

Wednesday, February 11, 2015

Run SSRS report from code in AX2012 R3


public static void runSSRSReport()
{
   

SrsReportRunController controller;


controller = new SrsReportRunController();

controller.parmLoadFromSysLastValue(false);

controller.parmReportName("SR_MainAccount.AutoDesign1"); //name of report to print

controller.parmReportContract().parmPrintSettings().landscape(true);
 
controller.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::File);
controller.parmReportContract().parmPrintSettings().fileFormat(SRSReportFileFormat::PDF);
controller.parmReportContract().parmPrintSettings().overwriteFile(true);
controller.parmReportContract().parmPrintSettings().fileName(strFmt("\\\\shop3\\AxaptaPDF\\P%1.pdf",ID)); //filename to print pdf to
controller.parmReportContract().parmPrintSettings().fromPage(1);
controller.parmReportContract().parmPrintSettings().toPage(1);
controller.parmReportContract().parmRdlContract().setValue("mi_prisskilt_ItemId",ID); //parameters to send to report

controller.runReport();

}

quote from https://www.linkedin.com/groups/How-can-I-run-SSRS-3793661.S.210858144





Monday, February 9, 2015

AX2012 - Warehouse management II and Warehouse and Transportation management

Error



Storage dimension group Ware uses warehouse management processes that are enabled by the Warehouse and Transportation management configuration key, but the Warehouse management II configuration key is also enabled. This combination is not supported. Choose and enable only one configuration key.


Details explanation

https://kurthatlevik.wordpress.com/2014/05/15/ax-2012-r3-do-not-enable-wms-ii-and-the-new-warehouse-and-transportation-management-in-the-same-installation/

Warehouse Mobile Devices Portal - The mobile device interface cannot be opened....


I struggled with the error "The mobile device interface cannot be opened because either the display settings are not configured or they are configured incorrectly. Configure valid settings for the mobile device display." I checked the domain account for the IIS, changed the default company of the user account, but didn't help at all. After putting off my hair for days, I eventually found the trick.


Here is the AX2012 R3 online help file

To set up mobile device display settings, follow these steps: 

Click Warehouse management > Setup > Mobile device > Work user mobile device display settings.

Click New to create a new line. 

In the Name field, enter a name for the display setting. This should indicate where the device will be used. 

Optional: To use the display settings by default, select the Default check box. 

In the CSS file field, enter the file name of the cascading style sheet to use. Include the .css file name extension in the file name. 

In the Mobile device display settings view field, enter the file name of the ASPX view file to use. Do not include the .aspx file name extension in the file name. 

In the Keyboard shortcut field, map the key on the keyboard to the button on the mobile device display. 


P.S. The css and the display setting file can be C:\Program files (x86)\Microsoft Dynamics AX\60

And this is my reward


Friday, February 6, 2015

How to: Open a Development Workspace [AX 2012]


Click Windows > New Development Workspace. A Development Workspace opens in a new window.

You can also press CTRL+Shift+W to open a Development Workspace.

https://msdn.microsoft.com/en-us/library/gg846350.aspx 

Applying SMA10/20, SMA20/50 as trading signals

This is the comparison for results before and after applying SMA10/20 and SMA20/50 in the stock trader. Background Trading 3 stock ma...