function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amit Singh.ax1042Amit Singh.ax1042 

How to assign users to a particular record??

hi friends,

i have created a object named as Job,

i want to assign roles(different different users) for particular job record .

is it possible??

give me some idea about userrole... and how to user vf and apex in case of userrole?

Best Answer chosen by Admin (Salesforce Developers) 
aruna11.3081223889641084E12aruna11.3081223889641084E12

Do you want that job to be shared or accessed by that perticular group of users, right?

 

You can goto admin setup--> manage users--> roles

create a role there and assign users to that role.

 

Then goto admin setup--> security control-->sharing settings--> job object

Edit settings for Job object and make it private.

Save setting.

Then foto the related list "Job sharing rule".

Create new sharing rule give access to that role...

So, now, only users of this role will be able to see your job record.

 

Through apex class also it can be done...

But see if it solves your problem through config...

 

Thanks,

Aruna Lambat

All Answers

tom_patrostom_patros

You might want to look into Apex Managed Sharing, depending on the level of control you. There is a good example in the Apx help docs. 

aruna11.3081223889641084E12aruna11.3081223889641084E12

Do you want that job to be shared or accessed by that perticular group of users, right?

 

You can goto admin setup--> manage users--> roles

create a role there and assign users to that role.

 

Then goto admin setup--> security control-->sharing settings--> job object

Edit settings for Job object and make it private.

Save setting.

Then foto the related list "Job sharing rule".

Create new sharing rule give access to that role...

So, now, only users of this role will be able to see your job record.

 

Through apex class also it can be done...

But see if it solves your problem through config...

 

Thanks,

Aruna Lambat

This was selected as the best answer