Wednesday, 21 October 2015

AX 2012 Label ids are being displayed in Security roles form instead of text?

Hi,
I recently faced this issue where labels were appearing in the security roles form.
And surprisingly, those labels existed in AX.

To investigate further, I opened up my SecurityRole table and found out that AX had got Label ids in the Name and Description column instead of actual text. To fix this, I simply ran an X++ job that updated the table.

static void updateSecurityTableLabels(Args _args)
{
   SecurityRole role;
   SecurityTask task;
   LanguageId LanguageId = CompanyInfo::find().LanguageId;
   LanguageId fallBackLanguageId = "en-us";
   str newLabelStr;
   #define.LabelPrefix('@DMF*')
   ttsBegin;
   while select forUpdate role
   {
       if(role.Description like #LabelPrefix)
       {
           newLabelStr = new Label(LanguageId).extractString(role.Description);
           if(newLabelStr like #LabelPrefix)
           {
               newLabelStr = new Label(fallBackLanguageId).extractString(role.Description);
           }
           role.Description = newLabelStr;
           role.doUpdate();
       }
       if(role.name like #LabelPrefix)
       {
           newLabelStr = new Label(LanguageId).extractString(role.name);
           if(newLabelStr like #LabelPrefix)
           {
               newLabelStr = new Label(fallBackLanguageId).extractString(role.name);
           }
           role.name = newLabelStr;
           role.doUpdate();
       }
   }
   ttsCommit;
   info("Done");
}


Sunday, 9 August 2015

Microsoft Dynamics AX 7 (Rainier) What's new?

Microsoft Dynamics AX is a multi-language, multi-currency enterprise resource planning (ERP) business solution with comprehensive global business management features for financial, human resources, and operations management as well as additional industry capabilities for retailers, professional service industries, financial service businesses, manufacturers, and public sector organisations.
Dynamics AX 7.0 or AX2015, also known under the code name ‘Rainier,’ promises to impress AX users by delivering a new platform for AX deployments including on premises, public and private clouds options. It mainly focuses on offering customers precisely what they need, exactly when they need it, simultaneously providing a better understanding of the business operations and its processes.
The product strategy followed for Microsoft Dynamics AX 7 will be mobile first – cloud first.
  • Mobile first – the new enhancements ensure that the application experience, regardless of the device platform it’s accessed on, remains the same for the user.
  • Cloud first – is focused on AX 7’s new optimised platform which is suitable for both public and private cloud deployments with a “what you need, when you need it” approach on Windows Azure.

Key features in Dynamics AX 7:
1) Improved cloud access and mobility
As mobile devices begin to take the place of the traditional office tools, employees are increasingly using them to access data, offer sales quotes, check inventory and financial data and more. Dynamics AX 7 will include the enhancements to improve cloud access and mobility.
2) New browser-based interface
A browser-based interface will replace the current Windows Client making Dynamics AX capabilities available via new “work spaces,” promoting remote access across a variety of device platforms for enhanced collaboration.
3) Next generation user experience
Superior user experience will be delivered via the context-sensitive Windows 8 framework, based on the HTML5 technology.
4) Life-cycle management
Excellent life-cycle management will be offered – regardless of deployment choice from on premise, hybrid to full cloud.
Besides these, there will be other architectural enhancements that started in Dynamics AX 2012 R3 to make AX more customization in the cloud with smoother integration.

Courtesy: http://www.sysco-software.com/dynamics-ax-7-rainier/


Thursday, 9 July 2015

Exception has been thrown by the target of an invocation.AX 2012 Purchase order invoicing.

Hi,
This is a Microsoft bug.
This error occurs when you try to Invoice a Purchase order that has attachments such as Notes, etc.

If you uncheck 'Execute business logic in IL' you will get this error:

RecordInsertList object not initialized Error while posting invoice with prepayment


To fix this, simply add this line of code(see image):

Class: PurchAdvanceApplicationJournalPost
Method: init()




Monday, 22 June 2015

Getting DMF/DIXF missing dll error when running through Remote desktop service?

Sometimes you get missing dlls/assembly errors when running DIXF.

The dlls could be one of the following:

  • Microsoft.Dynamics.AX.DMF.Mapper.dll
  • Microsoft.Dynamics.AX.DMF.PreviewGrid.
  • Microsoft.Dynamics.AX.DMF.ServiceProxy.dll
  • DMFConfig.xml
  • Microsoft.Dynamics.AX.DMF.DriverHelper.dll
Resolution:

Copy the DLLs from the installation location (C:\Program Files\Microsoft Dynamics AX 2012 Data Import Export Framework Client Component) to the C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin folder.

What if you are getting error only when using Remote desktop service(RDS)?


In order to fix that, you need to make sure that the client folder in the RDS server has these dlls. Simply copy these dll files from your server bin location and paste that into RDS server in the following location:

C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin


Tuesday, 12 May 2015

Temporarily disable XDS in AX 2012?

Use the following code as an example:



public void lookup(FormControl _formControl, str _filterStr)
{
    XDSServices XDS = new XDSServices();

    XDS.setXDSState(0); // Disable XDS
    super(_formControl, _filterStr);
    XDS.setXDSState(1); // Enable XDS
}


Monday, 13 April 2015

Methods that can be used in AOT Query ranges?

Many times in AOT queries we add ranges that are dependent on current time, user id, company, etc. To facilitate this behavior, the "SysQueryRangeUtil" should be used. This class contains some bunch of methods that help fulfill this requirement.

Monday, 30 March 2015

Important step when adding a new field in DIXF entity?

Whenever you add a new field in the DIXF entity lets say, Customer. Make sure that the new target field appears in the Target fields list.

If it does not, you need to go to the target AOT Query for that entity and make sure the new field is there in the list of fields.

Now simply go and regenerate the mapping.