Change form view of record opened from Data Table from Instance Definition widget

Oliver Anderson
Kilo Sage

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:

OliverAnderson_3-1695922000423.png

 

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.

OliverAnderson_2-1695921943491.png

======

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

OliverAnderson_4-1695922132146.png

 

Changing the options.view variable in the Server Script on 'Data Table from Instance Definition'

OliverAnderson_5-1695922387369.png

 

A few other things that I can't remember lol.

3 REPLIES 3

D-Gray
Tera Contributor

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.

Data Table From Instance Definition Example.png

ekuklinski
Tera Expert

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

Shivalika
Mega Sage

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