Skip to Content

How to Query Logged in User's Access Restriction based on Assigned WorkCenter in SAP C4C ?

Hi All,

We have a custom object in place. We have applied AccessContext on Custom BO. Its working fine as expected when we access through OWL.

Same Custom BO is used in Std Customer & Opportunity TI screens as Embedded Component.

We have Configured the Access Restriction ->Restriction Rules in Business Role settings.

Configured access context working when we are navigating to WCV of custom BO, But If we Navigate through Account / Opportunity std BO (To Access Embedded Component), Records are displayed ir-respective of AccessContext Applied. (We have raised SAP Incident and following up)

We are trying to get the logged in user's Business Role -> Access Restriction Applied on Specific WorkCenterView(Our custom Object) to apply validations.

var IdentityUUID = Context.GetCurrentIdentityUUID();

var AssignedRoles = IdentityUtilities.GetAssignedRoles(IdentityUUID);

From Assigned Roles, I can able to get assigned WCV for logged in user.

var BusinessRoles = IdentityUtilities.GetAssignedBusinessRoles(IdentityUUID);

From Assigned Roles, I can able to get assigned Business Role for logged in user.

How can I get Access Context Details, Like Read,Write Privileges Assigned for the specific WCV the logged in user is assigned with ????



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 01, 2018 at 09:04 PM

    Hi Swathi

    At the moment it is not possible to retrieve such details dynamically over code in SDK.

    Why do you need to check the 'Read-Write' privileges assigned, how do you intend to use this information.

    If your access restrictions are not working I suggest you raise an SAP incident and let SAP Support guide you through a solution.



    Add comment
    10|10000 characters needed characters exceeded