Questions tagged [userrecordaccess]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
5k views

Getting Insufficient Access on task record while trying to edit it

I have a Job Record and Two Users like User A and User B. User A creates a task on Job Record 123 and tasked it to User B. Now User A is created by of this newly created record and user B is owner of ...
1 vote
1 answer
176 views

RowCause (Specified value is reserved and cannot be used): [RowCause]

My requirement is when user submit the log it should make the log record read only for the user who is submitting it and representative(another field on log which has lookup with user ). I have kept ...
0 votes
2 answers
1k views

How to restrict a user access to delete opportunity

here is my simple but a little clumsy scenario I have 4 users under a profile. My requirement is user1 should be able to delete his/her Opportunities but not user2,user3,user4. How can I achieve this, ...
0 votes
0 answers
80 views

(Interaction Studio) What could be the reason why an anonimous user - even after logging in - is not merged into the existing user?

I am facing an issue with Personalization (former Interaction Studio): my website has a public area and a private one, that users can access after login; in both these 2 pages we have Personalization ...
2 votes
1 answer
565 views

Does UserRecordAccess report edit-ability of ContentDocument or ContentVersion records?

Every user I query URA with for either object returns HasEditAccess=true even if the content is not shared with them (or with a group they are part of) - that is, they are not Collaborators at all.
1 vote
0 answers
99 views

Use of UserRecordAccess in queries during System.runAs()

I am building a feature that uses apex-managed sharing to define granular levels of record sharing. I would like to have end-to-end tests that sets up records, users, runs the feature, then validates ...
3 votes
2 answers
875 views

How do I know if a record was updated manually?

Background I have a piece of my system with rather complex architecture. I also create another object (Interaction_Log__c) where the user enters some other data about the call. On call-complete, I ...
1 vote
1 answer
355 views

Select Id, UserRecordAccess.HasEditAccess didn't understand relationship name on sObject Event

On Account I can run a query like so: Select Id, UserRecordAccess.HasEditAccess FROM Account and this would give me the information about user's access to the record in a single query. However, if I ...
1 vote
1 answer
1k views

how Can I find out if the current user has access to a record on clicking button on my object by using lightning flow?

how Can I find out if the current user has access to a record on clicking button on my object by using lightning flow ? there is a custom button configured on object , on click of that button i want ...
0 votes
1 answer
1k views

Check if list of users has access to list of account records

Before Creating an accountShare record I need to check first if the user has access to the related record I am well aware that I can get it done using the UserRecordAccess Object select RecordId, ...
2 votes
1 answer
73 views

Simulate “with sharing” for specified user (in integration)

The need: An external system is querying SF data via an Apex REST API. It authenticates to SF via an integration user account (an M2M integration). We need the data returned by the API to be ...
0 votes
1 answer
613 views

Non admin profile with access to read and edit all objects

Is it possible to give a user access to all objects (read and edit) but not allow them to do admin stuff like workflows, process builders, creating new permission sets or any other admin stuff except ...
2 votes
1 answer
472 views

UserRecordAccess: Getting different results depending on query approach

I am getting different results for UserRecordAccess.HasReadAccess, depending on how I query the data: // Here I use a relationship / foreign key query List<MyCustomObject__c> records = [ ...
0 votes
1 answer
946 views

Can I use wire service to get data from UserRecordAccess and use it in LWC?

The query to the UserRecordAccess table is like this: SELECT RecordId, MaxAccessLevel, HasAllAccess, HasDeleteAccess, HasEditAccess, HasReadAccess, HasTransferAccess FROM UserRecordAccess where UserId ...
0 votes
1 answer
1k views

Allow user to delete records he does not own

I want to allow a user to delete all Jobs(custom object) even ones he doesn't own.Do I need to create a permission set. Please help!! Regards, Kunal
0 votes
1 answer
141 views

Process Builder to update related records with sharing settings problems

I'm trying to use Process Builder to update related records but it update records even if the user isn't able to see those records. Based in a field change from a object I'm updating all the related ...
3 votes
2 answers
2k views

Orders not visible to Customer Community users

Question in one line is - is there any option to make orders visible to customer community users keeping OWD to Private? Please read below for detailed problem. We have Customer Community User ...
1 vote
1 answer
3k views

Users able to edit records not owned by them inspite of OWD Setting Public Read Only

The OWD setting on Opportunity is Public Read Only Permission on Opportunity for User Profile is: Create, Edit, Delete, Read, View All. No permission to Modify All Sharing Rules are not defined for ...
0 votes
1 answer
519 views

Grant access using hierarchies not working

Facing an absurd issue. USER A is aligned with role A. USER B is aligned with role B. Role A is at higher level than Role B. OWD settings for a custom object Test_c is Private. Through manual ...
1 vote
0 answers
274 views

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY after Guest User Security Update

This month salesforce is rolling out a new security updated that prevents public sharing of record data, except via Sharing Rules that only provide Read-Only access. In preparing for this shift, I ...
3 votes
0 answers
338 views

How to determine if the user has enough permissions to Share ContentDocument to sObject

I have a situation that seems to be consistent with the top comments here: https://success.salesforce.com/ideaview?id=087300000006n4GAAQ Specifically, i have a Content Workspace aka Content Library, ...
1 vote
1 answer
438 views

Can we pass a list of id in UserId on a soql query made on UserRecordAccess

I am trying to find access levels on a certain record and this falls in a body of a trigger for which i need to bulkify the data coming in. So is there a possibility of passing a list of ids in the ...
0 votes
1 answer
59 views

how to transfer crud properties of a user of a certain record to another

How may i transfer CRUD properties of a record assigned to the owner of that record to another user in apex? UserRecordAccess could be used to find the properties but how to do it for multiple ...
0 votes
0 answers
65 views

Marketing Cloud API for Admin Users [duplicate]

I am creating an external tool to help with auditing user access across multiple applications. One of those on the list is Marketing Cloud to be able to see which users have accounts and their status. ...
4 votes
0 answers
342 views

Sharing rule causes sibling access leakage

(I actually think this might be a bug...) Note: Org-wide defaults on accounts/contacts/opportunities/cases are all set to "Private". I have the following role hierarchy: As expected, Team Lead 3 ...
0 votes
1 answer
159 views

How to provide access in bulk

I have created a custom object with over 50 custom fields but only system administrators have access to all the fields now is there any way I can provide the access to other profiles at once I can ...
2 votes
1 answer
4k views

Login as another user without View setup and configuration permission

Can an user be given login as another user privileges without giving 'View Setup and Configuration' permission and 'Modify All Permission'? As the need is to do testing in sales force logging in ...
0 votes
1 answer
2k views

Give delete access to records of particular users without 'Modify All' using apex

I want to give delete access to some set of users in certain condition to some records. I don't want to do this using profiles/permission sets. I want to achieve this using apex. Could anyone please ...
0 votes
1 answer
808 views

Out of Office button

Scenario: I'm the manager and I have an employee. My employee was on a sick leave so I want to put a message on his/her user profile that this employee is on a sick leave. Problem: The problem is ...
0 votes
0 answers
48 views

Identify the reason why a user has access to a record [duplicate]

UserRecordAccess tells you which records user has access to. But it doesn't inform why a user has access to that record. I'd understand that this can be complicated but this is one source of ...
-3 votes
1 answer
483 views

Help needed with test class

I am new to code and needed to check the UserRecordAccess in flow. I was able to put together the below, and it actually works and let's me check the HasEditAccess in flow to then act on it. However ...
0 votes
1 answer
1k views

Why account owner should have a role to enable associated contacts as community users?

I cannot find any information as to how the owner record or the owner's role affects records visibility when a record is owned by Customer Community user. I am trying to understand why do we have to ...
1 vote
2 answers
261 views

Unable to access record by few users

I have a custom field (type- Text(18) (External ID)) say Ext_ID__c on a custom object. We are using custom profile assigned to a group of users. For few users, Ext_ID__c is accessible, however for ...
1 vote
1 answer
68 views

set up sharing rules in a way that allows Community Users to edit their own Contact record

I need some help. Can you tell me please how can I set up sharing rules in a way that allows Community Users to edit their own Contact record ? I tried to change OWD, Sharing rules, Sharing on ...
6 votes
1 answer
358 views

API 34.0 introduces INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY on portal user self-updating contact?

I have the following test that asserts that a portal user is able to update it's own contact first name. @IsTest public class MyTestClass { @IsTest static void portalUserSelfUpdateContact() {...
1 vote
0 answers
51 views

How to control the visibility of user's list when we place @user in chatter in salesforce

I want to limit the users which is showing as a list when I place @username on the chatter on the community. My scenario is that if user place @username in the chatter feed on the community then I ...
0 votes
0 answers
82 views

Facing issue while editing record

i am trying to edit the record in one of the custom object, but i am getting error Insufficient Privileges. Profile having access to read,edit,create,view all .Please suggest what is the problems is ...
0 votes
1 answer
1k views

Unknown User - Can't find based on Id

We have the following apex code in our trigger. Id myId = UserInfo.getUserId(); User me = [SELECT Id, Name, Email, Profile.Id, Profile.Name FROM User WHERE Id=:myId]; This line sometimes throws below ...
1 vote
0 answers
45 views

Marketing Cloud User and Role data pull

Trying to pull user and role data to cover t eh following. Is there any Reports or SQL out there that can help with this? List of all users Business Unit and what roles are assigned to each user ...
0 votes
1 answer
107 views

How can I grant specific administrative privileges without granting view/modify all data?

How can I restrict a user to do only the following activities? User maintenance - Create Users, Deactivate Users, Change Permissions, Change Role in hierarchy, Update Name, Federation Id, and other ...
1 vote
1 answer
377 views

set the field Ownership a read only for a specific profile?

I have only 1 profile that i need to disable this option, as I dont want them to be able to change the ownership for: Accounts, Leads, Opportunity But when i try to do it as I would do a different ...
7 votes
2 answers
1k views

Cannot query UserRecordAccess for Tasks

I am running my query using the Rest API, but I have reproduced the issue in Workbench as well. The below query works for Account, Opportunity, and Contact, but fails for Task: SELECT ...
1 vote
0 answers
138 views

Get the number of Opportunities for each User in the org (the count must include the records to which the User has atleast read access)

I need to get the count of Opportunity record for every User in the org where the User has atleast read access on the Opportunity record. I need to store the data obtained per User for every month in ...
1 vote
2 answers
70 views

Group user permission

I want to give permission / access to group of users. Within the group, all users should be able to view/edit each other's records, but not from the other team. The object in question is set to ...
0 votes
1 answer
388 views

Force.com User Subscription Limitations, need a workaround for using opportunity

In our organization, we are planning to take Licenses for few users with very limited accessibility , where they can edit accounts, contacts and Opportunities and few custom objects. We are thinking ...
4 votes
2 answers
3k views

How to query users who have access to a particular record?

I have been going through the forums and the documentation and I do not find a way to query the Users who have access to a particular record. For example, when I upload a document, a mail has to be ...
1 vote
1 answer
2k views

Workaround to get the UserId from userRecordAccess?

Is there anyway how we can get the UserId from userRecordAccess? It is not possible to query UserId from userRecordAccess. SELECT RecordId,MaxAccessLevel,HasAllAccess, UserId , ...
1 vote
0 answers
36 views

Query returns nothing when querying UserRecordAccess and filtering with ChatterMessage records

The query in the following screenshots works fine when UserId contains a System Administrator user Id (first screenshot) but returns nothing when the user's profile is a custom one (second screenshot)....
6 votes
1 answer
2k views

Salesforce UserRecordAccess query not returning results

I have an apex class that is declared 'without sharing'. This class does some background processing and as a part of that processing, determines whether or not record owners have access to other ...
0 votes
1 answer
518 views

Validating record access in Salesforce for multiple users and records?

I have a batch job that process 100 records at a time. During this process it attempts to find and assign ownership of the record to a given user based on different criteria. My problem is that ...