0

I have an Object structure like Parent - Child relationship. Where in i just need to display records where logged-in user is lookup in Parent record. Leave Balance is Parent Object and Leave Request is Child object. User object is in lookup relationship with Leave Balance object. Leave Balance record for every user have been created using trigger written at User object. So, when user logged-in and check Leave Balance, user can see only his records in Leave Balance object. I have tried Orgwide defaults but as User is not the owner of Leave Balance records, it couldn't work. Any kind of suggestions will be highly appreciated.

  • if user is master to Leave balance,logged in user can see leave balances of all the users he have access to right... – Sravan Alaparthi Jan 7 '15 at 10:24
  • Login User can see his Leave Balance only. But in salesforce User object can't be Master object It's a salesforce limitation. – user2423706 Jan 7 '15 at 11:33
  • @user2423706 may be using the same user trigger you can set the owner of the Leave Balance record to the user value which is in lookup field and then give appropriate CRUD permissions so that user logging in can see his own balance record. – Yogesh D Jan 7 '15 at 11:48
0

I have used Trigger written at User Object and add code to change owner of Leave Balance object. So, that once we define permission set we can restrict visibility to specific user only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.