Tuesday, March 23, 2010

Wednesday, March 17, 2010

How to close the main form immediately after closing the sub form

Here is the standard NAV example to close the main form immediately after closing the sub form.

1) Open the Form 5784 from the Object Designer.

2) Click the Modify button to open the “Source Document Filter Card” from the ‘Filters to Get Source Docs.’ form.

3) Close the “Source Document Filter Card”. This will close the main form “Filters to Get Source Docs.” as well.

You can close the form conditionally, using the following set of example code in the ‘Run’ button.

GetSourceBatch.USEREQUESTFORM(ShowRequestForm);
GetSourceBatch.RUNMODAL;
IF GetSourceBatch.NotCancelled THEN
  CurrForm.CLOSE;

Friday, January 29, 2010

Calculated field on a page is only recalculated when the OnValidation trigger is run

A page will only update a field if it detects that there is some code on the OnValidate trigger. This is done for performance reasons to avoid unnecessary updates.

Please click the link to read the complete story from the Microsoft Dynamics NAV Team Blog.

Friday, January 22, 2010

ERP_Data Philosophy

Even though I have good knowledge on different aspects of ERP, today I noticed a very good data philosophy in the David Studebaker book related to ERP.

“Enter once, use everywhere”

Wednesday, December 23, 2009

Transformation Tool Issue

There may be possibility in some forms to show the records in bold & colors based on the conditions.

CurrForm."No.".UPDATEFONTBOLD(Condition);

CurrForm."No.".UPDATEFORECOLOR(Condition);

While converting this form to page using Transformation Tool, we will face compilation errors in page because same code is moved into the pages.

After the R&D, I found CodeRules.txt in the Transformation Tool does not have proper rules to transform the above kind of code in to pages.

For Example:

For CurrForm.”No.”.ENABLED(Condition), it is working properly because of the following marked code rules.

  • <find>
  • !currForm!.!var1!.ENABLED :=
  • <declareVariable>
  • !var1!Enable
  • <declareVariableType>
  • Boolean INDATASET
  • <replace>
  • !declaredVariable! :=
  • <moveValueToProperty>
  • !declaredVariable!
  • <movePropertyToControlName>
  • !var1!
  • <moveToProperty>
  • Enabled
  • <comment>

But for Currform.”No.”.UPDATEFONTBOLD(Condition), it is not working because there are not code rules for <moveValueToProperty> <movePropertyToControlName> <moveToProperty>

  • <find>
  • IF !var1! <> !var1!::!var2! THEN
  •   !currForm!.!var3!.UPDATEFONTBOLD := TRUE;
  • <replace>
  • !currForm!.!var3!.UPDATEFONTBOLD := !var1! <> !var1!::!var2!;
  • <find>
  • !currForm!.!var1!.UPDATEFONTBOLD :=
  • <declareVariable>
  • !var1!Emphasize
  • <declareVariableType>
  • Boolean INDATASET
  • <replace>
  • !declaredVariable! :=
  • <comment>

Solution: Either we should change the code rules or modify the page manually.

Wednesday, December 16, 2009

New Report Properties in NAV 2009 SP1

Microsoft Dynamics NAV 2009 (Sp1) reports has new properties to utilize the advantages in the Visual Studio report designing.

Using the following properties, you can design the RTC reports with additional functionalities:

  • EnableHyperlinks (Useful for Drill Down from a Report to a Page functionality)
  • EnableExternalImages
  • EnableExternalAssemblies

Tuesday, December 15, 2009

Reporting for Microsoft Dynamics NAV 2009 (SP1)

Microsoft has provided a very good demo script with scenarios on how to use the new reporting functionality in Microsoft Dynamics NAV 2009.

This documents covers the following functionalities.

  • Format text and add colour
  • Interactively sort table data in a report
  • Add charts
  • Save a report as a PDF or an Excel file
  • Drill down from a report to a page
  • Please click the link to download the Demo Script from the Partner Source.