Below is sample job to force delete inventtrans, which will take care of invent on hand update.
static void DeleteInventTrans(Args _args)
{
Dialog dlg = new Dialog("Delete inventtrans ?");
DialogField dlgFld;
InventMovement inventMovement;
PurchLine purchLine;
PurchLineRefRecId recId;
;
dlgFld = dlg.addField(typeid(PurchLineRefRecId));
if(dlg.run())
{
recId = dlgFld.value();
purchLine = PurchLine::findRecId(recId);
if(purchLine)
{
InventMovement = InventMovement::construct(purchLine);
InventUpd_DeleteMovement::newMovement(
inventMovement,true).updateNow();
info("done");
}
}
}
Tuesday, August 25, 2009
Saturday, August 15, 2009
IE keeps prompt for password for IIS website
I have an IIS website hosting reporting service and I use integrated windows authentication.
The problem was my IE keeps prompt for password while I can log in successfully using firefox.
I am using IIS 6.0, IE 6.0. After googling I got this trick :
Go to Tools > Internet Option > Advance > Untick 'Enable Windows Integrated Authentication'.
The problem was my IE keeps prompt for password while I can log in successfully using firefox.
I am using IIS 6.0, IE 6.0. After googling I got this trick :
Go to Tools > Internet Option > Advance > Untick 'Enable Windows Integrated Authentication'.
Friday, August 14, 2009
Dynamics AX 2009 reporting service error
I used to get this error message when opening reporting service from Ax :
Error during processing of ‘AX_CompanyName’ report parameter.
(rsReportParameterProcessingError).
Even this error occured in the AX 2009 VPC that previously works perfectly.
This information from partnersource (requires partnersource login) says that in SQL Server 2005 the execution account should not be used, and in SQL Server 2008 it is set to BC proxy account.
I am using SQL Server 2005, so I clear the execution account in the SSRS configuration (Start > Program > SQL Server 2005 > Configuration tools > Reporting Services configuration. In the execution account part (the bottom one), clear the option 'specify an execution account'.
Hope this helps many people trying to solve the same error message.
Error during processing of ‘AX_CompanyName’ report parameter.
(rsReportParameterProcessingError).
Even this error occured in the AX 2009 VPC that previously works perfectly.
This information from partnersource (requires partnersource login) says that in SQL Server 2005 the execution account should not be used, and in SQL Server 2008 it is set to BC proxy account.
I am using SQL Server 2005, so I clear the execution account in the SSRS configuration (Start > Program > SQL Server 2005 > Configuration tools > Reporting Services configuration. In the execution account part (the bottom one), clear the option 'specify an execution account'.
Hope this helps many people trying to solve the same error message.
Monday, July 6, 2009
Accessing sharepoint windows internal database
Using SSMS in local server, use this service name instead of server\microsoft##SSEE
\\.\pipe\mssql$microsoft##ssee\sql\query
\\.\pipe\mssql$microsoft##ssee\sql\query
Thursday, July 2, 2009
Configuring reporting service for Dynamic Ax 2009
I follow the steps in Ax installation guide on how to install reporting service for Ax.
When I came on setting up application pool, I got this error
The identity of application pool 'AxReportServer' is invalid, so the World Wide Web Publishing Service can not create a worker process to serve the application pool. Therefore, the application pool has been disabled.
This is corrected by assigning Ax proxy account to local IIS_WPG user group.
Later I need to assign ax proxy account to ReportServer and ReportServerTempdb database.
When I came on setting up application pool, I got this error
The identity of application pool 'AxReportServer' is invalid, so the World Wide Web Publishing Service can not create a worker process to serve the application pool. Therefore, the application pool has been disabled.
This is corrected by assigning Ax proxy account to local IIS_WPG user group.
Later I need to assign ax proxy account to ReportServer and ReportServerTempdb database.
Tuesday, June 30, 2009
Code that must not be put in data source active() method
Recently I got this error when trying to update spec quantity in salesEditLines form.
Cannot edit a record in Sales order - Update table (SalesParmTable).
The values displayed in the form are not current, so an update or deletion cannot be made. To view the current values, on the Command menu, click Restore or press CTRL+F5.
Call stack shows nothing but suddenly system goes to the write() method of the SalesParmTable. It is strange that I didn't change any field but it fires SalesParmTable.write() data source method.
Comparing the modification, I found that my fellow developer put a field assignment code within the SalesParmTable.active() method, so the code will always be run repeatedly (not sure how many time per minute, but it is very often). Since system get message that a field has been changed, write method is fired although the stack trace does not show any indication why write() method is fired. Again, it is hard since debugger doesn't tell what previous event causing this write() method.
So then I remove the field assignment code from the datasource active() method and the problem is gone.
The lesson from this is that we must never put an field assignment code within datasource active() method. It should only contains code for changing field behavior such as alowedit, enabled, visible, etc.
Cannot edit a record in Sales order - Update table (SalesParmTable).
The values displayed in the form are not current, so an update or deletion cannot be made. To view the current values, on the Command menu, click Restore or press CTRL+F5.
Call stack shows nothing but suddenly system goes to the write() method of the SalesParmTable. It is strange that I didn't change any field but it fires SalesParmTable.write() data source method.
Comparing the modification, I found that my fellow developer put a field assignment code within the SalesParmTable.active() method, so the code will always be run repeatedly (not sure how many time per minute, but it is very often). Since system get message that a field has been changed, write method is fired although the stack trace does not show any indication why write() method is fired. Again, it is hard since debugger doesn't tell what previous event causing this write() method.
So then I remove the field assignment code from the datasource active() method and the problem is gone.
The lesson from this is that we must never put an field assignment code within datasource active() method. It should only contains code for changing field behavior such as alowedit, enabled, visible, etc.
Monday, June 29, 2009
Sharepoint error after change domain
After we rebuild a new Active Directory, my windows sharepoint service could not start.
It showed this error message :
The file exists. (Exception from HRESULT: 0x80070050).
I am sure this is due to SID change of new domain. After googling around I found this website that helps me solve the problem.
The point is that userinfo table in Admin_content_xxxx database has to be updated with the new sid. I use getsid tool to reveal my new sid.
However it shows sid in s-n-n format while sharepoint store sid in hex format. So I created a vb program that convert decimal sid string to hexadecimal. The code is copied from this blog.
It showed this error message :
The file exists. (Exception from HRESULT: 0x80070050).
I am sure this is due to SID change of new domain. After googling around I found this website that helps me solve the problem.
The point is that userinfo table in Admin_content_xxxx database has to be updated with the new sid. I use getsid tool to reveal my new sid.
However it shows sid in s-n-n format while sharepoint store sid in hex format. So I created a vb program that convert decimal sid string to hexadecimal. The code is copied from this blog.
Subscribe to:
Posts (Atom)