Showing posts with label AX 2012. Show all posts
Showing posts with label AX 2012. Show all posts

Thursday, May 21, 2015

SSRS report deployment error

A lot of error can pop up when we deploy the report from AX one of them is "User does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.", below are some few place that you can check whether it's already being configured properly:
  • Check whether UAC has been properly set up (disable it for the fastest way)
  • Set respective user as administrator in SSRS server.
  • Check whether respective user has access rights to the SSRS folder
The easiest way to resolve this was to add the respective users to the whole SSRS site as "System admin" role on below location at your SSRS report manager

Wednesday, May 6, 2015

Dynamics AX 2012 SSRS changes not reflected after deployment

After we change the report format at Visual Studio and save it; sometimes when we deploy it from AX client it won't reflect the changes. I've spend quite some times to check why it's not reflected. There are few points that you can check :
  • Check whether Visual Studio properly save the report into AX (most cases)
    • Try to close the "Designer" before saving the report
    • Try to "Add to AOT" not only save
  • Deploy the report directly from Visual Studio (fast workaround)
  • Delete all *.auc file at respective users appData folder
You can always "compare" the report to see the changes.

Tuesday, August 5, 2014

Generate QR barcode in Dynamics AX 2012

I just realize that Dynamics AX 2012 already provided the QR code generation under "C Sharp Projects" nodes


Below is the sample code how to use it

static void QRBarcode(Args _args)
{
    Microsoft.Dynamics.QRCode.Encoder   qrCode;
    System.String                       netString;
    str                                 tempFileName;
    System.Drawing.Bitmap               netBitmap;
    Bitmap                              imageQR;
    FileIOPermission    perm;  
    BinData             binData;
    container           imageContainer;  
    ;
   
    netString = "TEST";  
    qrCode = new Microsoft.Dynamics.QRCode.Encoder();  
    netBitmap = qrCode.Encode(netString); //encode the string as Bitmap can be used already
   
    tempFileName = qrCode.GetTempFile(netString); //to get the QR temporary file
   
    perm = new FileIOPermission(tempFileName,'r');
    perm.assert();  
    binData = new binData();
    binData.loadFile(tempFileName);
    imageContainer = binData.getData(); //get the QR code image put inside container so can be stored inside database for storing or reporting purpose

    System.IO.File::Delete(tempFileName);

    CodeAccessPermission::revertAssert();      
}

By using the code above we don't need to put another 3rd party software to generate the QR bar code.

In standard AX process this QRCode function has been used to generate the E-Invoice QR bar code.

Sunday, June 22, 2014

Immediately get the table relation in form advance query

Adding a relation in the table sometimes is not enough to get the linkage table in the advance query/filter in the form, we still need to the cross reference update to make the table linkage immediately available at the advance query/filter in the form.




Thursday, November 7, 2013

Unable to find a unique Dimension code combination record corresponding to the entered values. error in dimension AX 2012

Recently I found an error when I build a SegmentedEntry in another customize form just like LedgerJournalTransDaily form.

"Unable to find a unique Dimension code combination record corresponding to the entered values." (can't find this error in label too)
When I try to debug the error I can't find any clue because this error send the notification after the modified event of the control. (I might miss some of the call stack that lead to this modified event). I tried to look again the standard function and found that I miss something in the "LedgerDimension" datasource field method, the method name is "resolveReference".
Here is the sample method code:
public Common resolveReference(FormReferenceControl _formReferenceControl)
{
    Common common = offsetLedgerDimensionController.resolveReference();

    return common;
}


Saturday, September 7, 2013

Dynamics AX 2012 RTM upgrade form freeze

Hi, there is one time I need to do single patch for Microsoft Dynamics AX 2012 (not R2). Once I applied the patch then restart the AOS, open up the AX application then the upgrade form is show up but you can not choose anything, just like a freeze form. I wonder this is bugs from Microsoft or something else.

After I tried many times until I found that you can choose the options from the development environment use parameter -development
Here is the official link from microsoft how to open Development environment.
http://msdn.microsoft.com/en-us/library/gg846350.aspx

Wednesday, July 24, 2013

Inventory master data migration AX 2012

Sometimes using DMF is quite hard if you don't know how to configure and use it, below is the sample code how to do the inventory master from code (not product master).
Actually we can always use standard AX 2012 code to release the product master but we need to configure it again once it's become the inventory master; so below code can help to release the inventory master with pre-configured data that you can define from a CSV file.
We will use help from AIF class InventItemService.
    

Tuesday, July 23, 2013

Customer account number sequence AIF error

Recently I'm facing an error regarding inserting a record from AIF (AX 2012), below are the message:

  • Line=1, Pos=1256, Xpath=/Customer/CustTable[1]/DirParty[1]
  • The number sequence Acco_368 does not allow the Customer account to be defined.


To resolve this issue is to change the customer account number sequence as a manual.

Monday, July 15, 2013

AX 2012 R2 Deployment manage code

Deployment of managed code in AX sometimes will cause an error because it was not installed or signed in the GAC or other reason.

below is the sample for the warning:

The description for Event ID 110 from source Microsoft Dynamics AX cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.



If the event originated on another computer, the display information had to be saved with the event.


The following information was included with the event: 

Microsoft Dynamics AX Business Connector Session 3.

Failed loading assembly ElectronicFiscalDocument_BR.dll.config 

Do full compilation of AOT and generate full CIL.

If still got the error then you need to open the respective Visual studio project for that assembly, rebuild it and deploy to the server/client/EP