Wednesday, 27 February 2013

How to Update/Modify Data in All Companies

We have Table 2000000006 - Company
 This table contains the names of all the companies that have been created in the current database.

And also we have CHANGECOMPANY Function

Redirects references to table data from one company to another.

[Ok :=] Record.CHANGECOMPANY([CompanyName])

We can create a ProcessingOnly report to update the data in all companies using above table and function.

Ex: If I have to Update "Allow Posting From" and "Allow Posting To" field of General Ledger Setup table in all companies then:

1. Create a Processing Only report with Company as dataitem
2. write below code in Company - OnAfterGetRecord() trigger

GLSetup.MODIFYALL("Allow Posting From",010213D); 
GLSetup.MODIFYALL("Allow Posting To",280213D);

//You can use variables in Request Form for From Date and To Date

Where GLSetup is global variable of record type variable with General Ledger Setup table.

Saturday, 23 February 2013

One or more filters are not valid and will be ignored Message in NAV RTC

Today I tried to run (Preview) a Report with Date Filter and I got below confirmation message

Microsoft Dynamics NAV

One or more filters are not valid and will be ignored. Do you want to continue?
No   Yes

Then I found that this is because of Wrong date format entered in Birth Date filter.
Date format in My system is set to DDMMYY and I entered as MMDDYY.

But this behavior is different in Classic Client (NAV2009R2).

I tried to enter same MMDDYY format in classic client Birth Date filed.

It immediately shown error message

Microsoft Dynamics NAV Classic
'013150' is not a valid date.


Friday, 22 February 2013

Where do I Found Current Sessions in NAV2013

Till NAV2009R2 we can see Current Sessions in Classic Client under
Under Sessions tab

But if I look at the same path in NAV2013 Development Environment?

The information is not available at above path.
Where can I find Current sessions in NAV2013?

In Order to see current sessions, we need login into the RTC client

Navigate to
CRONUS India Ltd./Departments/Administration/IT Administration/General
Under Tasks, we have sessions


How to Save Excel File Automatically

  ERROR('Excel Not Found.');
xlBook := xlApp.Workbooks.Add(-4167);
xlSheet:= xlApp.ActiveSheet;
xlSheet.Name := 'Mohana'; //Sheet name

xlSheet.Range('A1').Value := 'Mohana';
xlSheet.Range('B1').Value := 'MVP-Microsoft Dynamics NAV';
xlApp.Visible := TRUE;
xlBook.SaveAs('C:\Test\Mohana.xlsx'); // To save the excel file
xlBook.Close; //To Close the Excel

C/SIDE and C/AL Full Forms

C/SIDE stands for:
Client/Server Integrated Development Environment
C/AL Means
        Client Application Language

Thursday, 21 February 2013

About Me

My Name is Mohana Krishna Yadav, Mohana in short and simple .

Got MVP award in Oct 2011 and 2012.


Attended Mibuso NAVTechDays2012

Also Blogging at