How to manage contract information in the Customer Portal by authorizing each customer group

Satoshi Abe
Mega Sage

I would like to set the permissions for BtoB customers to view their contracts in the Business Portal (from Yohohama release) on a per customer group basis.

 

For example, Contact A from the General Affairs Department has Contract A-1, while Contact B from the Information system department has Contract B-1.

Then Contact A should be able to view only Contract A-1 on the portal, and not Contract B-1.

 

How can I achieve it with OOB?

Also, I found there is a table “contract_rel_group” in OOB, can this be utilized to achieve it?

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Satoshi Abe 

try these steps

1) Customer Group Configuration

Create customer groups (e.g., "General Affairs", "Information Systems") in sys_user_group

Assign contacts to groups via sys_user_grmember

2) Contract-Group Relationships -> use sample script below to create linkage

// Use contract_rel_group table to link contracts to groups
var gr = new GlideRecord('contract_rel_group');
gr.contract = 'sysId'; // Contract sys_id
gr.group = 'General Affairs'; // Group sys_id
gr.insert();

3) ACL -> ensure access to ast_contract table

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

thank you for the reply.

 

do you mean the 'contract_rel_table' is suitable to apply this use case?

 

I think it would be not required to create a script (step2) , as the 'contract_rel_group' table has the contract field and group field.

 

additionally, should we define the ACL to group?

@Satoshi Abe 

yes that's the table.

if script is not required then you can manually configure

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader