Role base filtration for Contacts lookup not working in Portal Edit page

Hi

I have applied filtration logic for one Contact lookup field in a section edit page based on User Role and role-based contacts alone getting listed in that field. But when I put the same filter in portal edit page of the section for the same lookup field, it is not showing the contacts. 

Please find below the used code.

Case: Users having Role Id : 'KYC', has to be listed in the lookup field.

Filter code:  Inside Attributes,

"GlbKYC": { 

// Attribute data type.

"dataValueType": Terrasoft.DataValueType.LOOKUP,

// The configuration object of the LOOKUP type.

"lookupListConfig": {

"filters": [

function() {

var filterGroup = Ext.create("Terrasoft.FilterGroup");

filterGroup.add("IsKYC",

Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "[SysAdminUnit:Contact].[SysAdminUnitInRole:SysAdminUnit].SysAdminUnitRoleId", "C14E5787-4BF5-4FA8-A407-96FB942A02E2"));

return filterGroup;


}]}},

Kindly help to resolve this.

 

Regards

Abinaya

Like 1

Like

1 comments

Hi Abinaya,

 

SysAdminUnit object is not accessible from the portal due to security reasons and creating filtration using this object is not possible for portal users. Also it is not recommended to use "Sys" objects on the portal since system objects have restrictions in the application core related to the portal.

 

You need to create a separate object to store connections between system users, their roles and contacts. This custom object will be accessible from the portal and you will be able to execute filtration under a portal user.

 

Best regards,

Oscar

Show all comments