Friday, September 29

AX 2012: Forms - Row wise disable field based on other field value in grid

There are several ways to disable a field, but in many cases the whole column is disable. In these blog I am discussing about how to disable a field base on other field value.



Step 1:
First of all, you have to change the properties of your field in the form design, change the declaration property to YES.

Step 2: Go to Datasource in your form, select the field Datasource, in method override the active method and write you logic there.

For example:
In active method:

formfieldname.enable(datasourcename.fieldname > 3);

Whenever a record is active in a grid the above line base on condition update the form field.

Friday, September 8

Dynamics AX X++ Code - Amount To Word Conversion in X++ Code

There are many ways to convert REAL into string words but below code snippet is simple and easy to modify according to your business logic. This code will first round off you amount then convert it into Word. Hope you will find it useful.


For any recommendation and suggestion relate code kindly feel free and comment below if your answer is more accurate and better than mine.

public str AmountToWords(real _amount)
{

    int             amount;
    str             amount2Words;

    amount       = real2int(round(_amount , 1));
    amount2Words = Global::numeralsToTxt(amount);
    amount2Words = subStr(amount2Words,5,strLen(amount2Words)-4);
    amount2Words = subStr(amount2Words,strLen(amount2Words)-10,-strLen(amount2Words));
    amount2Words = '(Amount:' +' '+  str2Capital(amount2Words) + ' only)';
    
    return amount2Words;
}

Thursday, September 7

SRSS - How To Append 'st', 'nd', 'rd' or 'th' To Day Numbers in Dates

Microsoft Dynamics AX ERP systems in it is a large and completed ERP Solution of all Time, but different user have different sets of requirement to achieve his/her business goal. A common example among all is to append Day number with  'st', 'nd', 'rd' or 'th'. Which is not possible in SSRS Report, because there are a lots of format available for date but you will not found any solution regarding this problem.

The available format in SSRS Reports are as following:
Formatting Date and Time in SQL Server Reporting Services (SSRS) is a very common need. And in some cases customers look for a very specific format, so it is important to understand the basic components of date and time formats.
SSRS offers many in-built Date and Time formats. Below are some of the in-built Date formats available in SSRS:
For appending all the above suffix you need to follow following steps:
1. Open any Report in Visual Studio and insert a textbox contain Data Field of Date Type,

2. Right Click on Textbox, Go To Text Box Properties

3. Click on Number tab, click on custom format option then click on fx button in black.

4. A form will open, copy the below text and paste there to need to change following text with your database date field.

Fields!FieldName.Value, "Dataset"

1. Replace FieldName with your Date Field
2. Replace Dataset       with your Dateset Name


="d" + switch(int(Day((Fields!FieldName.Value, "Dataset"))) mod 10=1,"'st'",int(Day((Fields!FieldName.Value, "Dataset"))) mod 10 = 2,"'nd'",int(Day((Fields!FieldName.Value, "Dataset"))) mod 10 = 3,"'rd'",true,"'th'") + " MMMM, yyyy"


5. Press ok, Again ok. Deploy your report and check it on AX. Enjoy!!

Who Wins the ERP Systems Race - Dynamics AX, SAP or Oracle? - Microsoft Dynamics AX For a Reason

Why not any other ERP Solution beat Microsoft Dynamic AX, here are the Top Five Reason Microsoft Dynamics AX better than any other ERP Systems.


1. The Microsoft Dynamics AX is more than a General ERP system in terms of services and Technology, Dynamics 365 is the only first solution which provide cloud based ERP solution in the market todays.

2. Success behind any bussiness idea is ease of use, there are alot of example out there like Google, Microsoft also make there solution more ease to use for their client as well as for developer. Developer can code their out of box solution in Dynamics AX easily.


3. Another Key win over any other ERP Solution it's Dynamics AX flexibility. You can shape AX with your business logic and also you can submit your solution(entire Module) to Microsoft.

4. Microsoft has put a lot of emphasis on Life cycle Services (LCS), which features tools that enhance the efficiency and shorten the time with their system guided procedures and controls. It’s highly salable, making it easier to manage the entire life cycle of the software, from conference room pilot, through go-live, and on to post-implementation support.


5. It's US who makes Dynamics AX much greater than ever, how we can explore it open more dynamic ways which increase AX functionalities in term of anything like performances, consistences, Fast Development and Deployment, etc. 


Popular Posts