
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2019 05:44 PM
Hi Gurus,
if you have admin role your able to see price and total field order screen in both areas like SN and Service Portal, if not we need to hide those two fields. please post your thoughts
Maintain cart layout not for this requirement because we need to dynamical based longed user role
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2019 06:08 PM
Hi Bhargava,
You would probably have to clone the OOB "SC Order Status" widget to do what you are describing. I would question the value of running your own widget rather than just configuring the widget instance to hide the price and total cost.
CTRL-Right Click "SC Order Status" widget >> Select "Instance Options"
Deselect "Display Price" and "Display Total Price"
Result:
This would hide the "Display Price" and "Display Total Price" fields for everyone (including admins) but would be much more supportable long term.
Let me know if this worked for you.
Brent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2019 06:03 PM
you may need to modify ui macro servicecatalog_cart_template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2019 06:08 PM
Hi Bhargava,
You would probably have to clone the OOB "SC Order Status" widget to do what you are describing. I would question the value of running your own widget rather than just configuring the widget instance to hide the price and total cost.
CTRL-Right Click "SC Order Status" widget >> Select "Instance Options"
Deselect "Display Price" and "Display Total Price"
Result:
This would hide the "Display Price" and "Display Total Price" fields for everyone (including admins) but would be much more supportable long term.
Let me know if this worked for you.
Brent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2019 06:28 PM
Hi Brent,
Thank you for your swift response. There is any possibility to restrict based on roles.
Thanks,
Ram chekuri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2019 07:01 PM
Hi Ram,
Unfortunately not, the widget instance options will apply to everyone (including admins). That's why I was saying that you would have to clone the OOB "SC Order Status" widget and amend to build the logic to only show price and total to admins.
I personally wouldn't go down this route as you will then be responsible for maintaining the widget from then on.
If you did want to clone the widget then you could add the following to the server side script:
data.isAdmin = gs.hasRole("admin");
and on HTML template side you would have to amend the ng-if statements that determine which fields are displayed. I only have a Madrid developer instance so I can tell you which lines to amend on this:
<!–– Line 55 html template for SC Order Status widget in Madrid -->
<th class="wrapper-md col-md-2 hidden-sm hidden-xs" ng-if="(::options.display_price === 'true' && data.showPrices) || data.isAdmin">${Price} (${ea.})</th>
<!–– Line 57 html template for SC Order Status widget in Madrid -->
<th class="wrapper-md col-md-2" ng-if="(::options.display_total_price === 'true' && data.showPrices) || data.isAdmin">${Total}</th>
screenshot below:
Hope this helps
Brent
P.S. If my suggestion helped then please mark as helpful and/or correct so other community members can benefit from this information.