Skip to main content

Posts

Showing posts with the label Microsoft

How to check the number of marked records on the Forms

Scenario 1: User is checking the rows in the grid to mark them for deletion, I want to get the number of checked records to do some thing Solution Use the buffer_Ds.recordsMarked().lastIndex() to check the number of the records that are marked for deletion. Scenario 2: User has marked the multiple records for deletion on the Form, now I want to do some manipulation on the deletion and refresh the Grid or the Form. What should I do Solution: Never write the research code in the delete method because the delete method on the Form is called per row and calling research would break this behavior, since research calls the executeQuery(). DeleteMarked() is the good place to write the research code since it is called once if there are multiple records, you should write the research code just after the super() call. Note: The deleteMarked() method is not called when there is a single record for the deletion.

Dynamics AX Event IDs

http://blogs.msdn.com/b/axinthefield/archive/2011/03/01/dynamics-ax-event-ids.aspx Recently a fellow PFE compiled a list of the AX Event IDs with their description and a possible action. This post is intended to give end users a better idea of the messages generated by the AOS service within the Application Event Log within the Windows Event Viewer. If you are receiving messages, it may be necessary to contact the Dynamics AX Support Team at Microsoft for more assistance as this may be an indication of more serious troubles in the system. Error and Warning Messages The messages in the following table can be informational only, but often are a result of an issue within the Dynamics AX application. They do may require user action. ID Message text Description Action 103 Microsoft Dynamics AX 2009 – The control handler not installed The Microsoft Dynamics AX Server Manager could not initialize the control handler. Can be caused by failed system setup. The registration of the AOS ...

Generation of CodePage using X++

Case Study: In this demo scenario, we are going to build Windows Code page using X++ class. For this project, I have build a generation class which basically returns the list of available codePage. private void buildCodePage() { System.Text.EncodingInfo[] encodingInfoArray; System.Text.EncodingInfo encodingObject; RecordInsertList recordInsertList = new RecordInsertList(tableNum(CodePageTable)); System.Exception ex; InteropPermission permission = new InteropPermission(InteropKind::ClrInterop); ; // Clear always the codePage data is available delete_from codePage; try { permission.assert(); encodingInfoArray = System.Text.Encoding::GetEncodings(); // BP Deviation Documented. for (i = 0; i CLRInterop::getAnyTypeForObject( encodingInfoArray.get_Length()) - 1; ...

Comparing AX and Active Directory User Accounts

metod 1 I was recently working with an AX 2009 customer who wanted to compare the user accounts configured in AX with the user accounts in Active Directory. The basic goals were: 1.Find all AX user accounts that no longer exist in Active Directory. 2.Find all accounts that are disabled in Active Directory but not in AX. It would be great if AX would flag these scenarios for you, but unfortunately it doesn't. If you’re interested in knowing if you have any orphaned accounts or accounts that should probably be disabled in AX, here’s a quick way to do just that. 1.Export AD users to a CSV file. I used a PowerShell command for this step. The command I used requires the Active Directory Module for Windows PowerShell. This is installed by default on domain controllers, but it is also available via the Remote Server Administration Tools for Windows 7 if you want to run it from a workstation instead. http://www.microsoft.com/download/en/details.aspx?id=7887 2.Create a table for the AD ...

Update all records shown in a form

If you want to update, or do something else, with all records shown on a form (i e only the records shown by the filter), you can use the following code. In the example below, CustTable is used as example. void updateRecords() { CustTable custTableLocal; QueryRun queryRun; ; queryRun = new QueryRun(CustTable_DS.queryRun().query()); while (queryRun.next()) { if (queryRun.changed(tableNum(CustTable))) { custTableLocal = queryRun.get(tableNum(CustTable)); // DO STUFF } } }