We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Contracts not visible in business portal

Elena Spıru
Mega Guru

Hello,

 

I've created and added a record producer in the Business portal. Besides other variables, I've created "contracts", which has the following reference qualifier: javascript: 'account=' + current.variables.account;
When I test it in the portal (as admin), it works.
When I impersonate an user that has a company that is the account of the contracts, it doesn't show anything in the field.
E.G: contact Sally Thomas is part of company Fulco Intl.
Roles of Sally:

ElenaSpru_0-1769447146963.png

 

Company Fulco Intl has the following contracts:

ElenaSpru_4-1769446625132.png

When i impersonate Sally and I go in the Business portal, she is able to see contracts

ElenaSpru_5-1769446698944.png

BUT when I open the record producer and try to populate it, no contracts are showing.

ElenaSpru_6-1769446815279.png

The reference qualifier is correct, I've deleted it and still nothing shows in the field.?
I don't know if Sally is missing a role. If I add the contract_manager role, she is able to see everything correctly (with the ref qualifier) but we don't want to give the users the contract_manager role.

Is there another role that I'm missing? What would be the best approach in this situation?

Thank you,
Elena

2 REPLIES 2

Its_Azar
Kilo Sage

Hi there @Elena Spıru 

 

Can you try creating an ACL for the user and test it:

Create a table ACL on contract:

Type: record

Operation: read

Role: a custom role (e.g. contract_viewer)

Condition:

  • contract.account == user.company

answer = current.account == gs.getUser().getCompanyID();

  and asign that role to the user.

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,
Azar
Serivenow Rising Star
Developer @ KPMG.

Hello,

 

I already did that but same results...no contracts shown in portal.
ACLs:

ElenaSpru_0-1769454465637.png

ElenaSpru_3-1769454596802.png

 

Roles:

ElenaSpru_1-1769454486407.png

 

Business portal:

ElenaSpru_2-1769454523024.png