Вы находитесь на странице: 1из 6

Oracle Sales Cloud

Implementation Partner Workshop

Practices for Lesson 03D


Extensibility – Working with
Dynamic Layouts

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 03D Page 1 of 6


Oracle Sales Cloud Implementation Partner Workshop

Practice 03D-1: Dynamic Layouts


Goals
 Create a dynamic layout

Time
10 - 15 minutes

Overview
In this practice you will create two additional dynamic layouts for the opportunity detail page in
the simplified UI. One of these pages will be based on a record type field, and the other will be
based on a Groovy expression. You will then test the results.

You will implement these rules:


 If the Win Probability is < 60%, show a default layout
 If the Win Probability is < 60% and the Access Level is set, show a secure layout
 If the Win Probability is > 60%, show a high-probability layout.

Tasks
1. If you are currently signed in to the application, sign out. Then sign in to the Simplified UI
using your assigned login.
2. In the global area at the top of the page, verify that you are in a sandbox. If you are not,
enter the sandbox you created in the last lab.
3. Create a record type field for the opportunity object.
a. Navigate to Application Composer.
b. Set Application = Sales.
c. Expand Standard Objects.
d. Expand Opportunity.
e. Click Fields.
f. Verify that there is not currently a custom field with Type = Record Type.
Note: Objects can have only one Record Type field.
g. Create a new field with Type = Record Type.
h. Set:
Display Label Access Level
Name AccessLevelnn
where nn is your student number
i. For Lookup Type, create a new Lookup Type with:
Meaning Access Level nn
Lookup Type EXT_ACCESS_LEVEL_nn

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 03D Page 2 of 6


Oracle Sales Cloud Implementation Partner Workshop

j. Create three lookup codes:


k. Be sure to Save the newly created lookup codes.
Meaning Lookup Code Display Sequence
Standard STANDARD 1

Executive EXECUTIVE 2
Secure SECURE 3
l. Set Default Value = Standard.
m. Examine the table of roles. For each role:
 The "Available Record Types" list allows you to select which record types that role
can access. This allows you to limit the user's available selections. For example,
only roles with security clearance should be able to set the access level to
"Secure".
 The "Default Record Type" list sets the default type for when a user with that role
creates a new record. This overrides the default value set in the Default Value
section
Because your student login has many roles assigned (which is not typical of a normal
user), locking out the secure role would involve adjusting every role in the list,
therefore, you will not modify the defaults in this practice.
n. Click Save and Close.
o. Add the Access Level field to the default layout.
1) In the regional area, under Opportunity, click Pages.
2) Click Simplified Pages.
3) In Details Page Layouts, select the Default Layout record.
4) Click Edit.
5) In Summary, click the Edit icon.
6) Add the Access Level field to the Selected Fields.
7) Click Save and Close.
8) Click Done.
4. Create a dynamic layout that hides the Revenue field based on the value in the record type
field.
a. In Details Page Layouts, select the Default Layout record.
b. Click the Duplicate Layout icon.
c. Set New Layout Name = Insecure Layout.
d. Verify that Source Layout = Default Layout.
e. Click Save and Edit.
f. In Summary, click the Edit icon.
g. Remove Revenue from the selected fields list.
h. Optionally, remove additional fields; be sure not to remove the Access Level field, as
this layout's visibility will depend on that field.
i. Click Save and Close.
j. Click Done.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 03D Page 3 of 6


Oracle Sales Cloud Implementation Partner Workshop

k. On the Insecure Layout record, Open the Type list.


l. In the Available Record Types dialog box, select Specific Type.
m. Move Standard to the Selected list. Standard users will not see revenue.
n. Click OK.
5. Create a dynamic layout that reorders the subtabs based on the Win Probability field.
a. In Details Page Layouts, select the Default Layout record.
b. Click the Duplicate Layout icon.
c. Set New Layout Name = High Probability Layout.
d. Set Source Layout = Default Layout.
e. Click Save and Edit.
f. Move the Interactions subtab to just below the Contacts subtab.

1) Above the subtabs, click the up down icon .


2) In the Configure Subtabs dialog box, use the up and down arrows to reposition the
Interactions subtab below Contacts.

3) Click OK.
g. Click Save and Close.
h. Click Done.
i. Create an advanced expression that applies this layout when the Win Probability is
over 60%.
1) In the High Probability Layout, click the Advanced Expression icon.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 03D Page 4 of 6


Oracle Sales Cloud Implementation Partner Workshop

2) At the top-right, set Depends On = Win Probability.


If you see more than one Win Probability, select them all.

3) In the code box at the bottom, copy this code. You will learn more about Groovy
Scripting in subsequent lessons.
if (nvl(WinProb, 0) >= 60)
return(true);
else
return(false);

4) At the bottom of the window, click OK.


6. Test the results.
a. Click the Home icon.
b. Click Yes.
c. If you get an error, sign in again.
d. Navigate to Opportunities.
e. Create Test Opportunity EXT nn, where nn is your student number.
f. Save and Close
g. Drill onto the Opportunity you just created.
h. Set Win Probability = 10%.
i. Notice that the Interactions subtab is not right under Contacts.
j. Set Win Probability = 70%.
k. Click to a different field.
l. Notice that the Interactions subtab is now right under Contacts.
m. Set Win Probability = 40%.
n. Set Access Level = Executive.
o. Notice that the Revenue field is displayed.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 03D Page 5 of 6


Oracle Sales Cloud Implementation Partner Workshop

p. Set Access Level = Standard.


q. Notice that the Revenue field is no longer shown.

r. Set Win Probability = 70%.


s. Click to another field.
t. Notice that the Revenue field is now shown again, even though the Access Level has
not changed.
This demonstrates why carefully ordering your layouts is extremely important: The first
layout whose conditions match will be applied, and the other layouts will be ignored.
u. Click Save and Close.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 03D Page 6 of 6

Вам также может понравиться