Purchasing

Get Involved. Join the Conversation.

Topic

    Boyuan Zhu
    Control Component Visibility on Purchasing Pages by Role
    Topic posted July 5, 2018 by Boyuan ZhuGold Medal: 3,500+ Points, last edited August 6, 2018, tagged How-To, Tip 
    178 Views
    Title:
    Control Component Visibility on Purchasing Pages by Role
    Content:

    Purchasing pages are secured by job roles out of the box. You can implement more fine-grained control to show or hide page components based on job role using Page Composer. The expression #{securityContext.userInRole[‘<role_code>']} returns true if the user has the job role, and you can use this condition to control the visibility of components. 

    For example, the View PDF button on the View Order page is visible not only to buyers but also to requesters and AP clerks when they drill into the order from their respective pages. The following steps show how to modify the View PDF button to be visible only to buyers. 

    1. Enter a sandbox and navigate to the View Order page. 
    2. Take the Customize Pages action and select Source from the View dropdown.
    3. Find the commandButton: View PDF component. 
    4. The existing EL expression for Visible is true. You can change the expression to #{securityContext.userInRole['ORA_PO_BUYER_JOB']}

    Setting the View PDF button to be visible only to buyers

    Document:
    viewpdf.png (148KB)