Hide Sections on Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2017 05:55 AM
Hi All,
using g_form.setSectionDisplay(sectionName, isVisible) is not hiding sections in service portal.
Dose any one know solution for this issue?
I am working on Helsinki.
Thanks,
sajan
- 4,746 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2017 06:10 AM
Are you using a client script or UI Policy?
There is currently PRB722129 open for setSectionDisplay not working in service portal when used in a UI policy.
As far as I know it should work in a client script though. If you're using a client script can you post your script so we can take a look?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 02:04 AM
Hi Jesse,
I have tried a client script whose UI$$('.veditor_header')[0].innerHTML = 'Customer Request Form';e is selected as both and i have just used a single if else block in the script.But it doesnt work.
Script:-
try{
if(g_user.hasRoles()){
alert('inside sectii0n');
g_form.setSectionDisplay('Section Name', true);
}
else{
alert('inside else');
g_form.setSectionDisplay('Section name', false);
}
}catch(e){}
Its giving me the alert in portal but not hiding the section.
Any immediate help is appreciated.
Regards,
Zabeeulla.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 07:39 AM
Hi Zabeeulla,
I just tried using this in a client script and it doesn't seem to work there either. It looks like we need to get the documentation in the PRB updated to reflect that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 07:56 AM
I did some further research and it looks like this did work in a client script in Helsinki but in Istanbul and Jakarta it is no longer working there either.
For example, this simple client script:
function onLoad() {
g_form.setSectionDisplay('related_records', false);
}
would hide the related records section if used in the portal in Helsinki but it does not in Istanbul.