How make Form widget read-only except Activity stream

reginabautista
Kilo Sage

Hi guys is there any way to make the form widget read-only but keep the activity stream open for input? Reason being is that for our Phase 1 iof Service Portal roll out, we only need to deliver a minimum viable product. So basically submission of requests, read and add comments to the Activity stream. I am not enabling the Related List, UI Actions and Links as it would entail a lot of testing on our end and potentially modifications to the Form widget. Right now if users would like to make updates to their requests, they would have to open the request in the native UI.

If anyone have a similar requirement in in the past, would really like to hear how you've implemented it. Thanks - Regina

1 ACCEPTED SOLUTION

cfennell
Giga Contributor

Hi Regina -

I just did this in our environment by cloning the "Form" widget and updating the Client Controller section to read the following...

Note: My case does not make the form read-only for Catalog Tasks, simple exclude the if statement and it should make the form read-only in all cases.

find_real_file.png

 

 

View solution in original post

7 REPLIES 7

anupraheja
Tera Expert

Hi,



You can create a new view having your required fields read only or edible as per your requirement for your table   using view specific UI policy and use that view when you calling your form widget.


This is how we did it and it worked.


We had to do the same thing for our end users to see their ticket. We created a new my tickets page and had to display a read only version of the record in a modal.


find_real_file.png



We did what Anup Raheja suggested and created a new view called spiButtonView for each table we will be displaying records for.


Then created a ui policy that made these read only.


In the UI policy, you MUST uncheck Global, then select your view.



We embedded the form widget in the modal and passed the sysid, table and view name to it.


find_real_file.png




We got an instance of the widget in our client script   make sure your pass your view name



spUtil.get("widget-form", {table: table, sys_id: sysId, view:'sp_ibutton_view'}).then(function(response) {


    c.myWidget = response;


    c.modalContentLoaded = true;


});


brendanwilson84
Kilo Guru

Hi Regina!



Could you clone the conversation widget and place it on the page and take out the hard coded activity widget on the form widget.


You can then also add field changes etc as type of audit log and conversation