Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How to make a field editable based for certain users? and how to make it appear in filters?

Posted on by 304
Hi,

I created a new text field (Notes) in salesTable.
 
1. How can I make it editable only by users who are able to create and amend sales orders?
2. How can I make it appear in query filter options when opening batch job dialog?
  • DELDYN Profile Picture
    DELDYN 304 on at
    How to make a field editable based for certain users? and how to make it appear in filters?
    Hi All,
     
    You all agreed that I need to use field level security to make my new field in SalesTable to be only editable by users who who have a sys admin role.
     
    So I'm assuming I need to go to the privilege called SalesTableDetailsMaintain right? And make grant property as Read.
    however I can't do any extensions to privileges. So what should I do in this case?
     
    And are there other privileges that I need to take into consideration?
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,605 Super User 2024 Season 1 on at
    How to make a field editable based for certain users? and how to make it appear in filters?
    As Martin and Andre suggested you can use field level security for 1st requirement.
     
    For 2nd one, mostly all fields will be selected in such filter queries. If this is the case you can simply add new field and select the value. But here problem is as you said, if it is memo, lookup cannot come just like a salesid. So in that scenario, manually the value need to be copy pasted.
     
    The 2nd scenario can also be achieved by UI builder class.
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,269 Super User 2024 Season 2 on at
    How to make a field editable based for certain users? and how to make it appear in filters?
    Hi Deldyn,
     
    Like Martin mentioned, you can use field level security. You then need to set 'deny' access to update to restrict access for normal business users. Note that doing this with the reason that system administrators should have access to the new memo field only is a wrong security design. The usage of system administrator role should be limited. In my opinion, all features related to sales orders should be executable by normal business users. You can then have one role that will have access to your new field and another role restricted with field level security.
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    How to make a field editable based for certain users? and how to make it appear in filters?
    Okay, that's a very different requirement. Your originally wanted to "make it editable only by users who are able to create and amend sales orders", while now you you're saying that even people which permissions "to create and amend sales orders" shouldn't be able to edit your field. Only SysAdmin could.
     
    You can design it by not giving permissions to edit this field to any role. SysAdmin will ignore these permissions, therefore they'll be the only one who can edit it. The last piece of information you're missing is how to do the setup for a single field only - see Field Level Security in Dynamics 365 for Finance & Operations.
  • DELDYN Profile Picture
    DELDYN 304 on at
    How to make a field editable based for certain users? and how to make it appear in filters?
    Hi Martin,

    I'm aware with security (including privileges, duties and roles) but normally we use them for an access to the whole table, form etc..But my question is how to make a certain field to only be editable by users who who have a sys admin role.
    So currently any user who have  privileges to edit salesTable, they will be able to edit anything in it. But how can I restrict that only one field(my new field in salesTable) won't be editable by those who can edit salesTable? Only sysAdmin can edit that field?
  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    How to make a field editable based for certain users? and how to make it appear in filters?
    1. Aha, so you're familiar with security in F&O at all, right? There are a few concepts to learn. In general, you need assign the user to a role that grants necessary requirements. A role consists of various duties, which are composed of privileges. A privilege grants certain access level to resources such as menu items or data entities. Of course, you can find much more details in documentation. Start with existing roles, such as Sales clerk.
    2. Yes, if you used Notes EDT, I think it's Memo. It seems that you chose an EDT that doesn't meet your requirements, so you need to either change your decision or requirements.
     
    No, it's not true "for fields to appear in filters then they need to be added for each query". I said something else. If a query includes all fields from a table, it'll include newly added fields to. Only if explicitly returns just some fields (e.g. because of grouping or performance optimization), you need to change the query, because adding fields to the table doesn't change the list of fields explicitly selected in the query.
  • DELDYN Profile Picture
    DELDYN 304 on at
    How to make a field editable based for certain users? and how to make it appear in filters?
    Hi Martin,
     
    1. In general, how can i make the field editable for certain users? Because I added another field in salesTable where it can only be edited by users with sysAdminRole
     
    2. But isn't the string size for Notes EDT Memo? What do in this case to make it appear?
     
    And so in general for fields to appear in filters then they need to be added for each query. There is nothing generic we can do?
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    How to make a field editable based for certain users? and how to make it appear in filters?
    1. There is nothing to do. Users who aren't allowed to edit SalesTable can't edit any fields, including your new one.
    2. If the query include all fields from SalesTable, your table will be shown there (unless you set the string size as Memo). If the query use just a selection of fields, you'll need to add your new field.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans