Hello,
I am using a formula field for a field that sets the days gone past a particular date. This field works all fine when I am logged in as an Administrator, however when I login as a user I get the following error:
ERROR: Error Wrapped p5.a585: Permission denied for both current User and Server API role (line #7)
Could someone point me in the right direction as to what permissions I need to enable for a "User" so that the API I use will work in all cases? Kindly let me know.
Cheers
Hi Iram,
It looks like the "Server API" role, doesn't have the "Edit" permissions on this component.
Can you please check if proper access is enabled for the above role by navigating thru :
"Setup > Administration Setup > Roles > Server API> Permissions"
For more information on this, please refer to below documentation URL :
documentation.progress.com/.../index.html
Regards,
Mani.
Hello [mention:ce2116fd258e46ee8b4509379c9663a4:e9ed411860ed4f2ba0265705b8793d05] ,
I have been successfully able to achieve one of the tasks related to Server API, however I still am not able to use rbf_selectQuery(...) API on the user. I basically have the user "loginName" field value and I am trying to get its ID.
rbf_selectQuery("select id from user where loginName=" + getUserID, 1, function callback(values) { alert(values[0][0]); });
Kindly let me know.
Cheers.
Do you mean ID of current user? Just use template token for that.
Hello [mention:05b5f00eae4a468d844fa8bedcafd110:e9ed411860ed4f2ba0265705b8793d05] , is there no way I could access it using a selectQuery like I did above? I would like to use it like that if possible please.
You certainly can use AJAX API rbf_selectQuery. For that current user must have VIEW permissions for all records for requested Object, in your case, USER.
Please note that Object integration names are case-sensitive, so you should use "USER" instead of "user" in your query.
Ok I'm trying to do the same and I am unable to get any response. There are no values returned from the selectQuery unfortunately. I have set VIEW permissions for all records on USER and also changed the object integration name to USER in my selectQuery. Any other suggestions on why it wouldn't run for a user?
If no value is returned and no error is thrown, I suggest to check that query parameter is valid. Also, since you're building your query dynamically, please add single quotes around your parameter.
I recommend you use "Test Query" button to debug your query.
Ok I found an issue with why it wasn't giving me a response. Basically my USER object has LDF permissions on it and when I try to run the selectQuery, it doesn't return back with any result. If I deselect the LDF permissions, I get a proper response back. I don't understand why there should be a relation between LDF permissions, USER object and Query API. Can anyone explain to me please with a possible solution?
Cheers.
USER object by default has LDF permissions. You can remove these permissions by removing "Organization" attribute. This may be a good idea if you're not using LDF.
I would like to use LDF with the USER object. Could you suggest a solution where I can use LDF permissions with Query API access enabled?
Cheers.
My understanding is that you are using LDF permissions: USER records outside available LDF scope are hidden.
Sorry I didn't get that. Does that mean I cannot access a USER object record with LDF permissions on it?
You can - if you have LDF permissions. It seems that you do not have LDF permissions.
How can I enable LDF permissions? Do I have to create a group and then allow access for that particular user record? Or can I do it for users with a "User" role as a whole?
Hi,
Please follow the steps in the below link to configure LDF.
documentation.progress.com/.../index.html
Thanks and Regards,
Chandra.G
HI, Looks like there is a confusion. We don''t want to allow everyone to access the User object, but only the Server API should have access to view this object as we are doing an ajax call to fetch details from the User object.
When the LDF permissions are disabled in the User object this works fine as the Server API role has access to the USer Object. However when LDF permissions are enabled, the Server API role is unable to access the USER Object and we receive the above error message. How can we enable the Server API to have access to the USer object while LDF permissions are enabled on the User Object?
Hope this is clear.
Query API applies LDF permissions first, so Server API permissions do not have effect in this case.