Update portal page to show new view

Andre8
Giga Guru

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.

 

3 REPLIES 3

johansec
Tera Guru

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 

  1. Go to that page where you took the screenshot
  2. Manually update the url and replace  '&view=sp' with &view=requester_poc
  3. 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 

  1. Go to the page you screenshotted 
  2. Ctrl Right click on the widget
  3. Instance Options
  4. 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. 
  •  

 

 

Saurav11
Kilo Patron
Kilo Patron

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:-

Saurav11_0-1666025001406.png

 

Then search for your view:- (Again taking example of ess)

Saurav11_1-1666025028219.png

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.

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