Does anyone know how to use a custom record permis...
# suitecommerce
m
Does anyone know how to use a custom record permission to hide a MyAccountMenu group? (MyAccountMenuPermission) My best guess is shown below, but doesn't seem to be working.
var MyAccountMenu = container.getComponent('MyAccountMenu');
var OrderApprovalsListGroupEntry = {
groupid: 'orders',
id: 'orderapprovalslist',
name: Utils.translate('Order Approvals'),
url: 'orderapprovals',
index: 99,
permission: [
{
group: "lists",
id: "customrecord_gam_transaction_approval",
level: "1"
}
]
}
f
Are standard permissions not working?
m
I only want the menu option to show if they have access to this custom record. But looking into it a bit more, this permission filter only appears to accept native records. So I guess I'm looking for advice on how to detect and hide it depending on the custom record permission.
b
You could extend the
SC.Environment.permissions
to include a custom permission that you set based on a field from the customer profile, which would allow the permission filter to accept it