The CreatorCon Call for Content is officially open! Get started here.

Field data restriction for widget

Victor Monteale
Tera Guru

Hi everyone, I have a query to do. Is there a way to restrict a field data access to a widget in the service portal? I have tried Read ACL, business rules (display, before - query), and UI Policy to avoid access to the field data but none of them have worked.

 

I know that by modifying the widget I can hide the field data on the html I don't want to show, however, because of "requirements" I must avoid widget updates, and hide that information in service portal.

 

Is there a system property to restrict access to field data, DOM manipulation, or something else I can use?

 

I appreciate any help

Regards,

1 REPLY 1

Community Alums
Not applicable

Hi @Victor Monteale ,

 

In Order to validate in server side   + client side + HTML - you can use below example :



SandeepDutta_0-1695450829235.png

 



Server script:

 

(function() {

 

data.portal_visible = false;



var portalGr = $sp.getPortalRecord();

 

if(portalGr.url_suffix == 'sp') {

 

        data.portal_visible = true;

 

}

 

})();