Change form view of record opened from Data Table from Instance Definition widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 10:34 AM
Is it possible to change the form view on a record when it is opened in the Service Portal from a Data Table from Instance Definition widget?
I have a custom Data Table from Instance Definition widget on a page in the Service Portal:
When I click on one of the records, I can see that something is passing "view=sp" to the URL, so there's gotta be a way to configure a different form to be passed. I have searched through the custom Data Table and custom Data Table from Instance Definition widgets, and have tried changing a few lines of code, but nothing seems to pass a different view to the URL of the opened record. I want to change the view to the "business_applications" view.
======
Things I have tried:
Adding [{"view":{"value":"234098f2402f9"}}] and [{"view":"2342f23465f2"}] to Option Schema on both 'Data Table' and 'Data Table from Instance Definition' widgets
Changing the options.view variable in the Server Script on 'Data Table from Instance Definition'
A few other things that I can't remember lol.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 01:39 PM
Hey Oliver,
Are you still struggling with this issue? I suggest checking the Client Script on the "Data Table from instance definition" widget. I recently had some view troubles myself, then I saw an object with a view I didn't want to use, and "changed" it. I'm looking to turn it into an option schema in the future, but this serves as an optimal solution for now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 11:44 AM - edited 03-10-2025 11:45 AM
I was trying to do the same thing and couldn't figure it out until I saw this reply. D-Gray has the solution. Go to line 4 as seen in the screenshot of the client script and change the view to whatever view you want
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 11:49 AM
Hello @Oliver Anderson
This will not work via the server script. Please check the client script from the "Data Table from Instance Definition" widget and you can find a json there which contains VIEW Key Value Pair - you just need to modify the view there.
Kindly mark my answer as helpful and accept solution if it helped you in anyway,
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY