web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

data security policy ( permission denied)

(0) ShareShare
ReportReport
Posted on by

i wanted  to restrict seeing  certain  objects  to   users  based on their role .  i created   another table where i have  user  and object relation . user must see only objects with relation on this table .  i  made query   and  security policy . query works  fine. People  who has that role  only sees  objects  connected to them . problem is , user  who has that role ,  cant  insert new object in table.  security policy permission denied . i understand  , that   new  rec id that is generated for object is not in my  table  and it permits  adding it .  on aosValidateInsert method of the table , i insert newly generated rec id of the object and user who adds that object in my table  and  users  can insert  new  values  now .  But  i am interested ,  if  there is a way to  allow person to see only certain objects from table  , but allowing  to insert new  ones  without a problem  .

*This post is locked for comments

I have the same question (0)
  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi David,

    There seems to be a duplicate thread

    community.dynamics.com/.../215299

    Can we delete the previous one?

    Ludwig

  • Community Member Profile Picture
    on at

    yes  , i forgot  to add tags  in previous one .

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,148 Super User 2025 Season 2 on at

    Hi David,

    Can you tell how the property Operation was set for the security policy? If it is set to 'All operations' it will also not allow enter new records if it doesn't meet the query requirements. You can use the property value 'Select' to allow also new entries, but then you also have to ensure the new object/user relation will be stored.

  • Community Member Profile Picture
    on at

    hi Andre,

    operation was set to all operations . but when  i  set to select , there is another problem . when i press ok button and  i want to save new record ,now  it removes all the fields from the form  . generated  number sequence , object type  and form says , that  those  fields are necessary ,update has been canceled .  

  • André Arnaud de Calavon Profile Picture
    301,148 Super User 2025 Season 2 on at

    Hi David,

    Can you provide some more information? What tables are constrained? What form are you referring to? Please provide all related details.

  • Community Member Profile Picture
    on at

    constrained table is MROObjectTable (Enterprise Asset Management) , Form That Creates MROObjectTableCreate .  this happens after  super method  of the table datasource.  it doesn't pass validations  on table insert  still  and  removes   filled fields from form and highlights mandatory.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,148 Super User 2025 Season 2 on at

    Hi David,

    I can't verify this as I have no EAM add-on installed. Probably you can try a similar policy on another table/form to see if it behaves OK there?

  • Community Member Profile Picture
    on at

    ok , thanks .

    i solved my issue .

    problem  was  in  table insert method .  it called  this.reread() method  which rereaded database and  user didn't  have  persmission to see newly  generated  recid  .

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans