Showing posts with label Pages. Show all posts
Showing posts with label Pages. Show all posts

Saturday, October 24, 2009

How Run button in Object Designer opens the page in the RTC

In the NAV 2009 SP1, it is possible to run the Page from the Object Designer.

image In the Object Designer, Run button will open the related page in Role Tailored Client. I think this is achieved using the HYPERLINK function in Navision.

HYPERLINK function passes a URL as an argument to an Internet browser.

By adding the following code in OnPush Tirgger of any button will open the related page in Role Tailored Client.

HYPERLINK('DynamicsNAV:////runpage?page=' + FORMAT(ID));

Here ID valud should be Page ID.

The above code can also be applied to open the reports in Role Tailored Client.

HYPERLINK('DynamicsNAV:////runreport?report=' + FORMAT(ID));

The above line of code can be added to any form/page to open the pages/reports dynamically.

Transformation Tool: Subfrom Menu Items to Pages

Using Transformation Tool it is possible to transform forms to pages in NAV 2009.
Forms like Sales Order, Purchase Order has Line Menu Button in the Main from and Transformation Tool automatically transforms the Line Menu button to the Sub page (ListPart). If the Menu Button has any Menu Items, Transformation Tool will also move the Menu Items to the Sub page.

Logic behind this is,Transformation Tool moves the Menu Item to Sub page if it finds the code like “CurrForm.subform.FORM.FunctionName” in the Onpush of the menu item.
Sales Order—>Line—>Reservation Entries, OnPush trigger has the following code.
CurrForm.SalesLines.FORM.ShowReservationEntries;
image

For example if you want a confirmation message before opening the reservation entries, you can write the code in the function or you can write like below:
IF CONFIRM(Text123,TRUE) THEN
  CurrForm.SalesLines.FORM.ShowReservationEntries;

If the code is like above, Transformation Tool will not move this Reservation Entries menu item to sub page. It will create a new Line menu button in the main page and add the Reservation Entries menu item to that.
image
TIP: If your requirement needs to write code before calling the function in the subform, maintain the code in single line like the following:
IF CONFIRM(Text123,TRUE) THEN CurrForm.SalesLines.FORM.ShowReservationEntries;

Monday, October 12, 2009

ProviderID property to System Parts

Last week after posting the learning on ProviderID property, I am going through the mibuso and found any interesting post related to the ProviderID linking to the System Parts.

I also tried to achieve this, but not able to find any solutions except create a new list page and adding system part to that.

The solution kine has given is working.

-Create a list page based on Sales Line.

-Add only two line. One Container and another Part.

-Change the Parttype to System and SystemPartID to Recordlinks for the part.

-Add the new list page to sale order form as Factbox

-Set the ProviderID and SubFormlink.

This solution is working as temporary.

Friday, October 9, 2009

ProviderID property in NAV 2009

ProviderID property is specifically for the RoleTailored client and not supported in the Classic Client.

This property enables you to create a link from a Repeater or any other type of control to a Factbox. It could also be used to link two FactBoxes. For example, the Sales Order page (42), uses this property to update the Sales Line FactBox by creating a ProviderID link to the SalesLines FastTab.

image

For Example:

If you open the Page 42 in design mode, <Control1906127307> “Sales Line FactBox” control ProviderID value is 58 which is the ID of the SalesLines control in the same page.

image 

That is the reason if you open the Sales Order page in Role Tailored Client, Sales Line Factbox details are updated based on the Sales line you selected.

image

Friday, October 2, 2009

Save View As in NAV 2009

In the Classic Client of NAV, it is possible to send the forms or reports in the Navigation Pane to the shortcuts using Ctrl+Alt+S or right click on the Item and selecting the “Send to Shortcuts” option.

imageSimilar kind of option also available in the NAV 2009 RT Client. The following exercise will show the procedure to add any form to the Navigation Pane.

Open the Role Tailored Client and select the Sales Orders

imageApply any filter to the Sales Order list page like the following:

image Select the Save View As option like the following:

image 

In the Save View As form you can change the Name accordingly and can change the Activity Group also.

image

System will also for restart confirmation to effect the changes and select Yes and check Home in the Navigation Pane.

image

New view is added to the Home and If you open the page you can still see the filters applied previously. Cool….

It is also possible to remove the views added to the Navigation Pane.

Select the Customize Navigation Page option.

image

Select the page you want to remove and select Remove option (or) Select Restore Defaults to remove all the changes and restore to the default view.

image

Thursday, September 17, 2009

How to Zoom in NAV 2009 Pages?

In the NAV Classic client forms using Tools-->Zoom (Ctrl+F8) we can see the all the fields and its values.

In the NAV RT Client pages also it is possible to zoom the page using About the Page (Ctrl+Alt+F1) in the top right side of the page.



NOTE: Zooming the Listpart (i.e. subform) is only possible by keeping the cursor in the subform and pressing Ctrl+Alt+F1 Keys. Clicking the About the Page button in the top right side of the page only works for the main forms.



NOTE: In the classic client zoom option display the fields in the same orders  as the fields in the table. In the RT Client zoom option displays first primary key field values and the remaining fields in the alphabetical order and Field ID also displayed...Nice....






 


 


 

Wednesday, September 16, 2009

How to place the Actions in the pages to new category (NAV 2009)

Instead of placing the actions in the standard categories like New, Process and Report, you can also place your action to your own categories.
The following steps will show the process with an example:

In the object designer, design the page 30 Item Card.

Move to the last blank line in the page.

Go to the Actions using ViewàActions.

Go to the properties of the Action you want to move to the new Category.

Change the following properties:
    • Promoted to Yes
    • PromotedCategory to Category4. Category 4 to 10 are available in the NAV 2009 SP1, other than the standard categories like New, Report and Report.
    • PromotedIsBig to Yes
Go to the Page properties and change the PromotedActionCategoriesML property value like below:
          ENU=New,Process,Report,New Category
First three values should be same like New, Process, Report and from there you can give your own name. If you change these values standard page Categories will be changed.

Run the page in RTC and see the result. You will find a new Category with "New Category" which has your action.

Friday, September 4, 2009

InstructionalTextML Property

Sets the Multilanguage value of the InstructionalText of the object. Use this property as a label.

This property is mainly useful for the ConfirmationDialog type pages. Text specified in this property will be shown when the form is opened.
InstructionalTextML ENU=The quantity on inventory is not sufficient to cover the net change in inventory. Do you still want to record the quantity?

Reference Page # 342


Page.RUNMODAL

Like in the Standard forms in the NAV 2009, pages also have the option to run it as Page.RUNMODAL.

CLEAR(SomePage)

SomePage.XXX; // any user-defined function

SomePage.SETTABLEVIEW(MyRecord);

SomePage.SETRECORD(MyRecord);

IF SomePage.RUNMODAL = Action::LookupOK THEN

SomePage.GETRECORD(MyRecord)...


If you want to use Page.RUNMODAL, we should be careful about the PageType property of the page.



PageType property should be Worksheet to show the fields in the page in proper order like below.





If the PageType property is not correct, then fields in the page will not be shown in the proper order.



The page shown above is for example purpose.