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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Security setup to restrict certain form fields

(1) ShareShare
ReportReport
Posted on by 1,911
Hi,

If i created  a form with two privileges (maintain and view)
this form has more than one datasource with lots of fields (30)


They want two menu items

one when opened should show all fields (allow edit, create delete)
 
the 2nd one, will open same form, but all fields should be editable except for 5 fields

so we can add code and say if the 2nd menu item is caller, then make everything not editable (no create, no update, no delete) and all fields disabled except for 5 fields.


My question is, is creating two menu items is a good solution? would it work with security? if yes how? but maybe with security it will be hard because the fields are alot?
Categories:
I have the same question (0)
  • Suggested answer
    Sohaib Cheema Profile Picture
    49,012 User Group Leader on at
    menu item security
    Hi, 
    You do not need code (if conditions).
     
    What you need are two privileges. Under the permission node, you need to specify the table name (and the type of access you want). Then, under the table node, add the fields (any number of fields you want ; those for which you want an access type different from the table access type), and for each field, specify the access type.
     
    You can also do this from UI (without going into AOT)
     
     
    cut short, you do not need If/else conditions (or any x++ code)
  • Suggested answer
    Martin Dráb Profile Picture
    236,687 Most Valuable Professional on at
    Security setup to restrict certain form fields
    It's doable. When defining a privilege, you can add extra details of the entry point, such as configuring individual data source fields:
     
  • Suggested answer
    NikolajSorensen Profile Picture
    1,784 on at
    Security setup to restrict certain form fields
    Having two seperate menu items should really not be necessary.
     
    If these are custom fields, then I would definitely argue that the "AOS authorization" property of those 5 restricted fields should be changed to "Yes".
     
    That will ensure that users will only have access to those fields if the fields are specifically added to a privilege/role. 
    Then you can add the specific field level access on the maintain privilege (which is supposed to have access) and not add it on the view privilege.
     
     
    Otherwise you can define on the view privilege that there should be "No access" to the 5 fields in question.
    With that solution you will however be blocked from accessing those 5 fields in case you have the view privilege, even if you are also granted the maintain privilege, as it will overrule any other access granted to those 5 fields.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 753

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 752 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 534 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans