In this walkthrough, you will learn how to create a new Role Center for the RoleTailored client. In Microsoft Dynamics NAV 2009, a Role Center is a type of page on which you can place different parts. Each part is a container in which you can host other pages or pre-defined system parts, such as an Outlook part or parts for adding tasks, notifications, or notes.
About This Walkthrough
This walkthrough illustrates the following tasks:
-
Creating a Role Center page.
-
Creating a card part page that displays a visual representation of work queues.
-
Adding actions to the card part page.
-
Adding the card part page to the Role Center page.
-
Adding the MyNotes system part to the Role Center page.
Prerequisites
To complete this walkthrough, you will need:
-
Microsoft Dynamics NAV 2009 installed with a developer license.
Story
Simon is a partner working for CRONUS International Ltd. Susan, the Order Processor at CRONUS, has contacted Simon and asked him to create her a new Role Center that will show her work queue, give her easy access to common actions like creating a new sales order, and will also display a list of current notifications.
Creating a Role Center Page
Simon creates a new Role Center using Page Designer. Simon knows that because Role Centers can contain several different parts, they are not tied to a specific source table. As a result, when Simon creates the Role Center page, he does not select a table in the New Page dialog box.
To create a Role Center page
-
In the Classic client, on the Tools menu, click Object Designer.
-
In Object Designer, click Page, and then click New. The New Page dialog box appears.
-
Click Create blank page, and then click OK.
The new page appears in Page Designer.
-
In the Name field of the first row, which has the type Container and the subtype ContentArea, type RoleCenterContainer.
-
Select a blank row, and on the View menu, click Properties.
-
Locate the PageType property, and then set the Value field to the page type RoleCenter.
-
Close the Properties window.
-
Save the page and name it Sales Order Proc. Role Center. Set the ID to 50005.
Creating a Sales Order Processor Queue Page
Simon needs to create a page that provides a visual indicator of the work Susan has to do each day. He wants to host this page in a part on Susan's Role Center so he will need to create it before he can add it to the Role Center page that he just created. He has already created a table that contains the fields that he wants to use, so he only needs to create the page. Simon knows that to create a queue, he must use the CardPart page type.
To create a sales order processor queue page
-
In the Classic client, on the Tools menu, click Object Designer.
-
In Object Designer, click Page, and then click New. The New Page dialog box appears.
-
In the Table text box, click the AssistButton, select the table 9053 Sales Cue, and then click OK.
-
Click Create blank page, and then click OK.
The new page appears in Page Designer.
-
In the Caption field of the first row, which has the type Container and the subtype ContentArea, type SalesOrderContainer.
-
Select a blank row, and on the View menu, click Properties.
-
Locate the PageType property, and then set the Value field to the page type CardPart.
-
Close the Properties window.
-
Click the Caption column in the second row and type For Release. Set Type to Group and set SubType to CueGroup.
-
Click the next empty line and then from the View menu, click Field Menu.
The Field Menu window opens, displaying the list of available fields from the SalesCue table (Table 9053).
-
Select multiple fields by holding down the CTRL key while you click the following fields:
-
Sales Quotes - Open
-
Sales Orders - Open
-
-
Click outside the Field Menu window.
A message box appears with the following message: "Do you want to add the fields that are selected in the field menu?".
-
Click Yes.
-
Close the Field Menu window.
-
Click the Caption column in the next empty line and type Sales Orders Released Not Shipped. Set Type to Group and set SubType to CueGroup.
-
Click the Left arrow to negative indent this line one level.
-
Click the next empty line and then from the View menu, click Field Menu.
-
Select multiple fields by holding down the CTRL key while you click the following fields:
-
Ready to Ship
-
Delayed
-
Partially Shipped
-
-
Click outside the Field Menu window.
A message box appears with the following message: "Do you want to add the fields that are selected in the field menu?".
-
Click Yes.
-
Close the Field Menu window.
-
Click the Caption column in the next empty line and type Returns. Set Type to Group and set SubType to CueGroup. Click the Left arrow to negative indent this line one level.
-
Click the next empty line and then from the View menu, click Field Menu.
-
Select multiple fields by holding down the CTRL key while you click the following fields:
-
Sales Return Orders - All
-
Sales Credit Memos - All
-
-
Click outside the Field Menu window.
A message box appears with the following message: "Do you want to add the fields that are selected in the field menu?".
-
Click Yes.
-
Close the Field Menu window.
-
On the File menu, click Save. Name your new page Sales Order Processor Queue. Set the ID to 50006.
-
To run the page, in Page Designer, select the page, and then click Run.
The RoleTailored client opens and displays the new page.
Adding Actions to the Sales Order Queue Page
Simon now needs to add actions to the sales order queue page. He knows that the card part page type is special in that he can include actions on individual groups within the page. These actions will then be displayed immediately adjacent to the queues on the page. He also adds code to the OnOpenPage() method to ensure that the work queues update to reflect Susan's current work when the Role Center opens.
To add actions to the sales order queue page
-
In page 50006, click the For Release group line, click View, and then click Actions.
Action Designer opens.
-
In Action Designer, click the Caption column in the first row, and enter New Sales Quote. Set the Type column to Action.
-
With the first row selected, click View, and then click Properties.
-
Set the RunFormMode property to Create.
-
Set the Image property to Quote.
-
Set the RunObject property to Page Sales Quote
-
-
In Action Designer, click the Caption column in the second row, and enter New Sales Order. Set the Type column to Action.
-
With the second row selected, click View, and then click Properties.
-
Set the RunFormMode property to Create.
-
Set the RunObject property to Page Sales Order
-
-
In page 50006, click the Sales Orders Released Not Shipped group line, click View, and then click Actions.
Action Designer opens.
-
In Action Designer, click the Caption column in the first row, and enter Navigate. Set the Type column to Action.
-
With the first row selected, click View, and then click Properties.
-
Set the Image property to Navigate.
-
Set the RunObject property to Page Navigate
-
-
In page 50006, click the Returns group line, click View, and then click Actions.
Action Designer opens.
-
In Action Designer, click the Caption column in the first row, and enter New Sales Return Order. Set the Type column to Action.
-
With the first row selected, click View, and then click Properties.
-
Set the RunFormMode property to Create.
-
Set the RunObject property to Page Sales Return Order.
-
-
In Action Designer, click the Caption column in the second row, and enter New Sales Credit Memo. Set the Type column to Action.
-
With the second row selected, click View, and then click Properties.
-
Set the RunFormMode property to Create.
-
Set the RunObject property to Page Sales Credit Memo.
-
-
In page 50006 in Page Designer, select the first empty line, click View, and then click C/AL code.
-
Enter the following code in the OnOpenPage() method:
Copy Code RESET; IF NOT GET THEN BEGIN INIT; INSERT; END; SETRANGE("Date Filter",0D,WORKDATE - 1); SETFILTER("Date Filter2",'>=%1',WORKDATE);
-
Save the page.
-
Run the page.
Adding Parts to the Role Center Page
Simon now needs to add his new sales order queue page to Susan's new Role Center. Simon knows that he can create multiple groups with multiple parts on the Role Center, but he will have to create one group that contains two parts, the sales order processer queue page and a notifications page.
To add parts to the Role Center page
-
Open the Sales Order Processor page (50005) in Page Designer.
-
Click the Name column in the first row and type SalesOrderRoleCenterContainer. Set the SubType to RoleCenterArea.
-
Click the Name column in the second row and type PartOneGroup. Set Type to Group and set SubType to Group.
-
Click the Type column in the third row and set Type to Part.
-
Click View and then click Properties.
-
Locate the PagePartID property and click the AssistButton in the value field.
The Page List window opens.
-
Click page 50006 Sales Order Processor Queue and then click OK.
-
Click the Type column in the fourth row and set Type to Part.
-
Press SHIFT+F4 to view the Properties window.
-
Set the PartType property to System.
-
Set the SystemPartID property to MyNotes.
-
Save the page.
-
Run the page.
Next Steps
Simon's next steps are to add the My Customers and My Items parts to the page.
See Also
© 2010 Microsoft Corporation. All rights reserved.