Thursday, November 22, 2012
How to clear user cache in AX 2012
Each AX user has a cache memory in its desktop. They can be cleared relatively easy. Just look for *.auc file usually located in C:\Users\XXXX\AppData\Local\ and delete it manually
Wednesday, August 22, 2012
I've stumbled across a problem in General Journal in which the primary key (Customer Account Number) was renamed (e.g. from C-000003 to C-DVL) and when it was created as a line in General Journal and then saved will throw a validation error "C-000003 does not exist". This happens because the financial dimension attribute has not been updated from C-000003 into C-DVL, so that everytime the LedgerJournalTrans was checked it will check C-000003 instead of C-DVL. To solve this problem, update the data in DimensionAttributeValueCombination display value from the old account number into the new one.
Tuesday, July 24, 2012
Code to set picked Invent Transaction into on order in Production Picking List
Courtesy of David
Courtesy of David
//DGU - Released Picked transaction
while select inventTransOrigin
where
InventTransOrigin.InventTransId == this.InventTransId &&
InventTransOrigin.ItemId == this.ItemId &&
inventTransOrigin.ReferenceCategory == InventTransType::ProdLine &&
inventTransOrigin.ReferenceId == this.ProdId
{
while select forUpdate inventTrans
where
inventTrans.InventTransOrigin == inventTransOrigin.RecId &&
inventTrans.inventDimId == this.InventDimId &&
inventTrans.StatusIssue == StatusIssue::Picked &&
inventTrans.VoucherPhysical == "" &&
inventTrans.Voucher == ""
{
inventMovementPicked = inventTrans.inventMovement();
inventDimPicked = inventMovementPicked.inventdim();
inventDimParmPicked.initFromInventDim(inventDimPicked);
inventUpd_Picked = InventUpd_Picked::newParameters(inventMovementPicked,inventDimPicked,inventDimParmPicked,
inventDimPicked,inventDimParmPicked,inventTrans.Qty * -1);
inventUpd_Picked.updateNow();
}
}
//End
Sunday, July 22, 2012
Error :
Uninstall SQL Native Client
Microsoft SQL Server 2008 Setup: The following error has occurred: A network error occurred while attempting to read from the file: [install-device-name--and-root-of-path-here]\x64\setup\x64\sqlncli[1].msiSolution :
Uninstall SQL Native Client
Tuesday, July 10, 2012
Useful Classes for Modifications
Here are some useful classes should any modification needs arises :
1. To modify ListPages, look for its Interaction classes. i.e : for PurchReqTableListPage, look for PurchReqTableListPageInteraction class.
2. To change whether an Inventory Dimension required to be mandatory or not, look for InventDimCtrl_Frm class. i.e : for ForecastSales class, look for InventDimCtrl_Frm_Forecast.
1. To modify ListPages, look for its Interaction classes. i.e : for PurchReqTableListPage, look for PurchReqTableListPageInteraction class.
2. To change whether an Inventory Dimension required to be mandatory or not, look for InventDimCtrl_Frm class. i.e : for ForecastSales class, look for InventDimCtrl_Frm_Forecast.
Monday, July 9, 2012
How to find On Hand Qty in AX 2012
Here's how to find On Hand Qty filtered by inventory dimension :
display Real itemOnHand()
{
ItemId itemId;
InventDimParm inventDimParm;
InventSumDatePhysicalDim inventSumDatePhysicalDim;
;
inventDimParm.initFromInventDim(this.inventDim());
return inventSumDatePhysicalDim::onHandQty(today(),this.ItemId,this.inventDim(),inventDimParm);
}
Thursday, July 5, 2012
How to enable Remote Errors in AX 2012 SSRS
How to enable remote errors in AX 2012 SSRS :
Open SQL Server Management Studio and run this query in the Reporting Service Database. You have to restart your SSRS instance service before it's going to take effect.
Open SQL Server Management Studio and run this query in the Reporting Service Database. You have to restart your SSRS instance service before it's going to take effect.
UPDATE ConfigurationInfo
SET Value = 'TRUE'
WHERE Name = 'EnableRemoteErrors'
Wednesday, February 22, 2012
How to access an Access MDB Database from Microsoft Dynamics AX 2009
You can use the following code :
static void ConnectToAccess(Args _args)
{
//Declare connection object
CCADOConnection cn = new CCADOConnection();
CCADOCommand command = new CCADOCommand();
CCADORecordset rs = new CCADORecordset();
str Name;
;
//open connection and execute SQL command
cn.open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Sample.mdb;Persist Security Info=False");
command.activeConnection(cn);
command.commandText("SELECT * FROM DEPARTMENTS");
rs = command.execute();
while (!rs.EOF())
{
info(Strfmt("%1",rs.fields().itemIdx(1).value())); //will display query value
rs.recordSet().moveNext();
}
cn.close();
}
Monday, February 13, 2012
Authorization Checks Code
Authorization Checks
Microsoft Dynamics AX 2009 performs automatic authorization when a user
accesses data through data sources on forms or reports. X++ code can also call
these checks in cases where automatic authorization does not occur.
Microsoft Dynamics AX 2009 performs automatic authorization when a user
accesses data through data sources on forms or reports. X++ code can also call
these checks in cases where automatic authorization does not occur.
if (hasSecurityKeyAccess(securitykeyNum(mySecurityKey),
AccessType::View))
{
//code requiring authorization goes here...
}
if (hasMenuItemAccess(menuItemDisplayStr(myMenuItem),
MenuItemType::Display)))
{
//code requiring authorization goes here...
}
DictTable dictTable = new DictTable(tablenum(myTable));
if (dictTable.rights >= AccessType::Insert))
{
//code requiring authorization goes here...
}
if
(isConfigurationkeyEnabled(configurationkeyNum(myConfigKey)
)
{
//code requiring authorization goes here...
}
Wednesday, February 1, 2012
Troubleshooting in the Development Workspace
Insufficient rights to start a Development Workspace error
To use the -development switch to start in the Development Workspace, you must have a
valid developer license code installed (X++ Source Code or MorphX Development Suite).
The Command menu is not available
The Command menu is only available if an Application Object Tree (AOT) window is open.
Press CTRL+D to open the AOT.
The Workspace menu items are not available
You must have a developer license code (X++ Source Code or MorphX Development Suite) to
open a Development Workspace.
The Application Workspace icon is not available
You must have a developer license code (X++ Source Code or MorphX Development Suite) to
open a Development Workspace.
Pressing CTRL+W does not open an Application Workspace.
No more than a total of eight workspaces can be opened in the same client session.
The Workspace toolbar is not available
To enable or disable the workspace toolbar, on the Tools menu, click Customize, and then
select or clear Workspace.
Troubleshooting in the Application Workspace
The Development Workspace icon is not available
There is no toolbar for workspace icons in the Application Workspace. To open a
Development Workspace from the Application Workspace, press CTRL+SHIFT+W.
The Workspace menu items are not available
You must have a developer license code (X++ Source Code or MorphX Development Suite) to
open a Development Workspace. Pressing CTRL+SHIFT+W does not open a Development
Workspace.
No more than eight workspaces can be opened in the same client session.
To use the -development switch to start in the Development Workspace, you must have a
valid developer license code installed (X++ Source Code or MorphX Development Suite).
The Command menu is not available
The Command menu is only available if an Application Object Tree (AOT) window is open.
Press CTRL+D to open the AOT.
The Workspace menu items are not available
You must have a developer license code (X++ Source Code or MorphX Development Suite) to
open a Development Workspace.
The Application Workspace icon is not available
You must have a developer license code (X++ Source Code or MorphX Development Suite) to
open a Development Workspace.
Pressing CTRL+W does not open an Application Workspace.
No more than a total of eight workspaces can be opened in the same client session.
The Workspace toolbar is not available
To enable or disable the workspace toolbar, on the Tools menu, click Customize, and then
select or clear Workspace.
Troubleshooting in the Application Workspace
The Development Workspace icon is not available
There is no toolbar for workspace icons in the Application Workspace. To open a
Development Workspace from the Application Workspace, press CTRL+SHIFT+W.
The Workspace menu items are not available
You must have a developer license code (X++ Source Code or MorphX Development Suite) to
open a Development Workspace. Pressing CTRL+SHIFT+W does not open a Development
Workspace.
No more than eight workspaces can be opened in the same client session.
To open a Development Workspace using X++
To open a Development Workspace using X++
You can also open a Development Workspace directly from X++ code. For example, you can
add a customized button in the client Application Workspace to open a Development
Workspace. The following X++ code can be used to open a Development Workspace.
You can also open a Development Workspace directly from X++ code. For example, you can
add a customized button in the client Application Workspace to open a Development
Workspace. The following X++ code can be used to open a Development Workspace.
static void OpenDevWorkspace(Args _args)
{
int hWorkspace;
;
hWorkspace = infolog.createDevelopmentWorkspaceWindow();
}
Friday, January 13, 2012
An unbalanced X++ TTSBEGIN/TTSCOMMIT pair has been detected. Causes of this include (a) too many/few TTSBEGIN or TTSCOMMIT, (b) return calls within TTSBEGIN/TTSCOMMIT pairs, and (c) user interaction within TTSBEGIN/TTSCOMMIT pairs.
Monday, January 9, 2012
What is Prompt Fields in Dynamics AX Reports
Prompt fields will display label for objects in a report. Filling up an EDT or fields of prompt fields will display labels for that EDT/fields.
Wednesday, January 4, 2012
Unable to create ActiveX Control error
Basically this error(Unable to create ActiveX Control. cmxphone Control) occured when we uninstall Microsoft Dynamics AX 4.0 and AX 2009 is still installed.
and when we open AX this error(Unable to create ActiveX Control. cmx phone Control) occurs.
Solution: To remove this error just copy smmphone.ocx from other system where AX 4.0 is still installed and put this on same path as-Installed Drive\Program Files\Microsoft Dynamics AX\40\Client
and when we open AX this error(Unable to create ActiveX Control. cmx phone Control) occurs.
Solution: To remove this error just copy smmphone.ocx from other system where AX 4.0 is still installed and put this on same path as-Installed Drive\Program Files\Microsoft Dynamics AX\40\Client
Subscribe to:
Posts (Atom)