Block

Jason116
Tera Contributor

0

4 REPLIES 4

ChanakyaMekala
Mega Guru

We can accomplish this as below:

 

1. Create a custom check box (like Block Portal Access) on Account table(if needs to be blocked on entire account) or Contact table(if needs to be blocked on individual )

 

2. Update OOB script include SPEntryPage in getFirstPageURL function, add these lines (sample, update as per your requirement) at the top

 

var contactAccess = new GlideRecord("customer_contact");
contactAccess.get(gs.getUserID());

if(gs.hasRole("snc_external") && contactAccess.u_block_portal_access){
return;
}

else{
remaining code
}

 


3. Or you can use your own script include and mention it glide.entry.first.page.script and glide.entry.page.script properties

Please mark Helpful or Answered if it had done so

.

That should work, and you need to refine based on your criteria portals being used in your company.

Vaishnavi Lathk
Mega Sage

We have same criteria, so we added a Role to the Index page which prevents anyone without the role from accessing the Portal.

 

VaishnaviLathk_0-1717043949486.png

 

 

We also added the role to the 'ticket' page which is the view that shows when a ticket is opened on the Portal.