Hello,
I’ve been trying to expose the Access RIghts of a Role by extending the Web Service Endpoint and adding the Access Rights by Role (SM201025) Screen ID to an endpoint named “AccessRightsByRole”.
I’ve populated the fields n AccessRightsByRole with the Role Information mapped object. As you can see I’ve inserted a new field named AccessRights which should hold the detail of 0 to many Access RIghts, which is an object mapped from RoleEntities.
Following the Acumatica Universities Advanced Data Retrieval with REST API 2024 R2 instructional video (19:39), I expected to see these Access Rights expanded for a role that was queried.
Example: GET {baseUrl}/AccessRightsByRole/Administrator?$expand=AccessRights
No matter which role I query, the AccessRights field is always an empty array.
{
"id": "{some GUID}",
"rowNumber": 1,
"note": null,
"AccessRights": ],
"RoleDescription": {
"value": "{some role description}"
},
"RoleName": {
"value": "{some role name}"
},
"custom": {}
}
I notice the warning on the AccessRights field “FIELDS” definition, but it reads “Do not include the fields of this object in a request that retrieves a list of entities. To retrieve these fields, request entities one by one by specifying key fields.”. After watching the university video, I thought the issue would be avoided by adding the role in the URL, fetching a single “Role Information” mapped object to many “RoleEntities” (in the custom Access Rights field). Any help or direction on how to get this information would be great. I am also looking to update this information using a PUT request as well.