Skip to main content

Posts

Showing posts from January, 2013

Renumber line number when its part of a key

In this post, I will show how to renumber the line numbers in a table with out getting the duplicate record is not allowed. A bit of background first, say you have a table with line number field. It gets out of sequence and now you want to renumber it. You can’t simply write a method to loop through and renumber it. The system won’t allow you do it. One solution is to number then to something unique (ie. negative numbers). Then do a second loop and number them correctly. Another solution is below. I store the RecId and LineNum in a temp table. Then I do a bulk update using update_recordset. Note: I am using a fake table below called WorkOrder and WorkOrderLine. static void renumberLineNum ( JournalId _journalId ) { WorkOrder workOrder ; WorkOrderLine workOrderLine ; TmpLineRenumbering tmpLineRenumbering ; real lineNum ;    while select RecId, LineNum from workOrder order by workOrder. L

Modify Microsoft Dynamics AX 2012 R2 SSRS configurations

Last year I had posted some powershell scripts to update the config files when installing multiple instances. I have update the scripts today to be compatible with R2. As usual, open up the scripts in notepad or powershell editor. Change the path of the instance and now there is a version number. For example: Update the bold highlighted text in the script. $version = " 6.2.0.0 " $webConfig = "C:\Program Files\Microsoft SQL Server\ MSRS10_50.ANDROMEDA \Reporting Services\ReportServer\rssrvpolicy.config" Should save you both time and making errors. The scripts are located here: http://dax2012ssrs.codeplex.com