- Navigate back to the Opportunity screen by first clicking Screen Flow in the left navbar.The Screen flow tool shows you all of the screens that you've created so far. Double-click the Opportunity snapshot in the screen flow to open the Opportunity screen in the Preview.
- In the Preview, click the Accounts tab.
- Double-click Add Component in the Preview to open the Components Palette.
- Select the Form component in the Components Palette.
- Drag the Form component into the Preview.
- In the Properties Inspector, click QuickStarts and then click Add Data. Complete the Add Data QuickStart as follows:
- Choose Opportunity in the Select Data Source page and then click Next.In the Data page, first expand the account field.
- Drag the Account fields into the Form Component Fields section in the following order:
- name
- website
- address
- city and state -- create a concatenated field by dragging these two into the same field.
- country and region (another concatenated field)
When you're done, the Data page should look like this
- Next, Next. In the Query page, click Finish. (You don't need to filter the returned data.)
All done. Now let's add the Notes tab
In this step, you'll create a list of notes for each opportunity that are written by various app users. Each list item identifies the notes' author by app user name
- In the Preview, click the Notes tab.
- Double-click Add Component to open the Component Palette.
- Drag a list component into the lower pane of the Preview.
- The Properties Inspector for the List component should be open.
- Go into the Add Data, and the layout appears
- You don't need all of the list fields, so choose the option that includes only the Title, Subtitle, and Value 1 fields and then click Next.
- In the Data Source page, choose the Opportunity Notes business object
- Map createdate to title, Comment to SubTitle, and username to Value1
Click Next and Finish
Now let's add the Create Note Screen.
In this step, you'll create a form that enables users to jot down notes for a selected opportunity
- In the Preview, select the screen component by clicking the Opportunity header.In the Properties Inspector for the Screen component, click Header Buttons.
- In the Header Buttons panel, click Button. Enter Create Note in the Button Label field.
CLick Tap
- Click Navigate to Screen.
- Put it in the DRAG AN ACTION HERE slot.
- Click Add
- In the Screen type page, pick Create and then click Next.
- In the Title page, enter
Create Note
and then click Next. - Choose Opportunity Notes (the business object that you picked to populate the List components in the Notes tab) from the Business Object menu and then click Next.
- Click Finish to return to the Action tab.
- Click Navigation Data Mapper.
- From the Current Screen category (which should be open by default), drag oid into both of the Oid fields.
- Click Finish and then click Save in the Action tab.
You'll revisit the Navigation Data Mapper when you plot the interactions within the screen flow. - Click Go to Create Note.
- The CRM service populates Comment and Username as the input fields in the form. Since you're going to display the name of the logged in user in the Notes tab, you don't need the user to add his or her name here. To remove the Username field, first right-click it in the Preview and then choose Delete.
- Right now, the Comment field is only a single line, so it might not provide enough space for users to enter notes. To make it easier to use:
- Open the Properties Inspector for the Comment field by either double clicking it in the Preview or by clicking Comment in the Properties Inspector.
- Right now, the Comment field is only a single line, so it might not provide enough space for users to enter notes. To make it easier to use:
- Open the Properties Inspector for the Comment field by either double clicking it in the Preview or by clicking Comment in the Properties Inspector.
- Add some helpful text in the Hint field, like Type your comments here....
- Increase the number of rows to 10.
- Open the Properties Inspector for the Comment field by either double clicking it in the Preview or by clicking Comment in the Properties Inspector.
- Choose Text Area as the screen type.
- Add some helpful text in the Hint field, like Type your comments here....
- Increase the number of rows to 10.
- In addition to navigation actions, MAX also provides business actions, like the ones that refresh data. You can't edit these actions, but by using the Business Action Mapper, you can change the custom business actions that have been created as part of the service. In this step, you'll change the custom action called Create Opportunity Notes so that your app users' names appear next to the notes that they create.
- The Configure Business Action Parameters page reveals how the Create Opportunity action enables the Create Screen to interact with Notes tab: it tracks new notes using the Opportunity ID (oid) from the parent Opportunity screen and it maps the values from the Create Notes' Comment and Username fields. The Create Notes screen has only one input field (Comments); app users can't enter their names here. To allow the name of the current user populate the list in the Notes tab alongside the comment that's entered in this screen, you'll need to change the parameter mapping.
Click Configure Business Action Parameters.
Remove the string from Username
Expand the Application User category.
Drag User Name into the Username field to populate the screen with the name of the current
app user.
Click Finish and then click Save after you return to the Configure Actions page.
Ok that's enough in this blog. In the next entry we will add the Accounts Screen Flow.
No comments:
Post a Comment