Create progress hourglass mouse pointer

Hourglass indicator looks (msdn)

 hour glass

The following example overrides the clicked method on a form control to refresh the database log.

Display an Hourglass Pointer

  1. Call the startLengthyOperation method when the operation starts.
  2. Call the endLengthyOperation method when the operation ends.

Both of these methods are on the Global application class.

The hourglass pointer is displayed until you call the endLengthyOperation method.

void clicked()
{
    super();
    startLengthyOperation();
    sysDatabaseLog_ds.research();
    endLengthyOperation();
}

Use a progress indicator during operations that take more than 2 seconds.

  • Use an hourglass mouse pointer if the process takes 2-7 seconds.
  • Use a progress bar if the process takes 8 seconds or more.

AX2012 show only some value of ENUM for ComboBox in Dialog

Previous post, I give a sample show only some value of ENUM in AX2009 , And this post I will try in AX2012 for same case. Fortunately in AX2012 has a new improved class from AX2009, The DialogEnumComboBox class makes work easier with a Dialog combo box control that represents an enumeration when only some of the enumeration values are allowed.

I try to modify Tutorial_RunbaseBatch class for use DialogEnumComboBox

Continue reading

How to uninstall a model

Have 2 methods to uninstall a model (refer microsoft)

Uninstall a model (Windows PowerShell)

  1. On the Start menu, point to All Programs, point to Administrative Tools, and then click Microsoft Dynamics AX Management Shell.
  2. At the Windows PowerShell command prompt, PS C:\>, type the following command, and then press ENTER.
    Uninstall-AXModel -Model <Modelname>
    

    This command uninstalls the specified model. By default, a confirmation request is displayed.

e.g.  default AOS

Uninstall a model - shell

If you input database or server parameter, the default AOS in used.

e.g. input specifics AOS

Uninstall-AXModel -Model <Modelname> -Server <ServerName> -Database <DatabaseName_model>

Uninstall a model specific - shell

Uninstall a model (AXUtil)

  1. On the Start menu, click Command prompt.
  2. Navigate to the directory for the management utilities. Typically, the location of this directory is %ProgramFiles%\Microsoft Dynamics AX\60\ManagementUtilities.
  3. At the command prompt, type the following command, and then press ENTER.
    axutil delete /model:<name>
    

    This command uninstalls the specified model. By default, a confirmation request is displayed.

TableId and FieldId changed

I think ,many people have ever been found issue about when you synchronization DB and found error or warning as tableId or fieldId changed and if you continue your data will be lost. I searched solution and found at goshoom blog

below is sample code for this solution, this code will find ID changed and use ReleaseUpdateDB() method update Id in DB.

Continue reading

Pre and Post Event handler

On AX2012 provided “Event Handler” It’s can helpful manage your cost and development time and  also easy manage coding. Someone when they have customization and need to interrupt standard process by new logic , they may code new logic directly in standard method, Yes! it can do. Imagine if Microsoft have a new update version such R2 or R3 and that method have a change code. You must compare between old method and new update method, then paste your customize code again. but if you use “Event Handler” instead, It can helpful easy  your update management.

How to use “Pre” and “Post” Event Handler?

Continue reading