Update portal page to show new view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 08:43 AM
I created a new view and would like to show that view of the record when a link is clicked to open the record. The current view is "sp" as shown in the screenshot. I have added the new view (requester_poc) to the form widget but the new view is not being displayed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 09:40 AM
In the form widget you will see this line
data.view = options.view || $sp.getParameter("view") || $sp.getParameter("v"); // no default
First it will attempt to see if there are any options ( ill explain this route soon ) and options.view isnt found then it will look at parameters from the url view first and if it doesnt find it then v
First thing I would try is this
- Go to that page where you took the screenshot
- Manually update the url and replace '&view=sp' with &view=requester_poc
- If this does the trick then update the code that navigates to this page to use the correct url query string
The second option is
- Go to the page you screenshotted
- Ctrl Right click on the widget
- Instance Options
- Look for view and populate
If this works be careful because if other pages are pointing to this page they will no longer use the sp view anymore and instead they will use this view.
Last option is to
- If there is not already an sp view defined for this make one for service portal ( this is super easy )
- Go to that table on the backend and open a record
- View the record in the view you desire
- Right click in the grey banner at the top and hit configure form layout
- Click view name scroll all the way down and click new
- Name it sp
- Boom your page should reflect this view now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 09:46 AM
Hello,
The view json needs to be as below:- (taking example of ess view)
{
"view":{
"value":"ess",
"displayValue":"Self Service"
}
}
Now looking at you json it looks correct which means maybe the display name is not correct.
Do the below:-
Go to views:-
Then search for your view:- (Again taking example of ess)
The title would be the display value.
Also from your code remove the showFormview json part.
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2024 05:09 AM
Thank you this did not quite solve my problem fully - but is has definitely led me closer to the answer. Thanks for sharing your knowledge