Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Permissions - user doesn't see records that assigned by code

(0) ShareShare
ReportReport
Posted on by 395

Hi,

We have a lot of records that were created by code.

We have a pre create plugin that change the owner of the record to be 'team1'.

Our problem is: users that have enough permissions to see those records - don't see them.

If we assign manually a record to another team and then assign it again to 'team1', Suddenly, the user sees it.

Another thing - If we create a record manually, the users can see this record (Without assign manually)

What can be the problem?

Thanks!

*This post is locked for comments

  • Verified answer
    tw0sh3ds Profile Picture
    tw0sh3ds 5,600 on at
    RE: Permissions - user doesn't see records that assigned by code

    Hi,

    For me it looks like platform bug. You should do a little more digging up, to make sure if it's platform bug or customizations bug. What I would do first is change your plugin that changes the owner to "Post-Create" (maybe even asynchronous). If course if you have also some other logic that can be difficult, but if it's the only logic, then this should be an easy change. I bet that it would resolve your problem, because Pre_create does not seem to me like a proper place to change the owner (at least in CRM 2013)

    Please make sure that you are not making some sime "misspell" bug - in your code you are assigning to a team that is different team then you are assigning manually - I know this looks silly, but I saw many times such simple mistakes and people spending whole day trying to figure it out.

    Also do another experiment - create a record by code (and not change anything) and create record manually. By your description user should see record 2 and not see record 1. Please compare this two records (the best way would be to compare them column by column in SQL). If you are sure that the privileges are set up correctly, you should also go to CRM SQL and check PrincipalObjectAccess table - and compare if both this records have the same entries.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans