Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Salary field in dynamics 365

(0) ShareShare
ReportReport
Posted on by 1,081

Hello community experts,

There is a requirement where I need to create a Salary field in model driven app and that field should only be visible to HR and manager but not to other department. How do i achieve that. 

Kindly advise,

Best regards,

Sumaira Noor 

  • Sumaira Noor Profile Picture
    Sumaira Noor 1,081 on at
    RE: Salary field in dynamics 365

    Thanks a lot for taking time to help Andrew and Ambesh

    Best regards

    Sumaira Noor

  • Verified answer
    Ambesh Singh Profile Picture
    Ambesh Singh 145 on at
    RE: Salary field in dynamics 365

    Hello Sumaira,

    - You can show /hide fields in Dynamics CRM using JavaScript , Business rules , Field level security.

    Record-level permissions are granted at the entity level, but you may have certain fields associated with an entity that contain data that is more sensitive than the other fields. For these situations, you use field-level security to control access to specific fields.

    The scope of field-level security is organization-wide and applies to all data access requests including the following:

    - Data access requests from within a client application, such as web browser, mobile client, or Microsoft Dynamics 365 for Outlook.

    - Web service calls using the Dynamics 365 Customer Engagement Web Services (for use in plug-ins, custom workflow activities, and custom code)

    - Reporting (using Filtered Views)

    Every field in the system contains a setting for whether field security is allowed. You can view this in the field definition from Solution Explorer. In Solution Explorer expand Entities, expand the entity that you want, select Fields, and then open the field that you want. If Enable can be selected, the field can be enabled for field security.

    Although most attributes can be secured, there are system attributes, such as IDs, timestamps, and record tracking attributes, that can't. Below are a few examples of attributes that can't be enabled for field security.

    ownerid, processid, stageid, accountid, contactid, createdby, modifiedby, OwningTeam, OwningUser, createdon, EntityImage_Timestamp, modifiedon, OnHoldTime, overriddencreatedon; statecode, statuscode

    You can view the entity metadata for your organization including which fields can be enabled for field security, by installing the Metadata Browser solution described in Browse the Metadata for Your Organization. You can also view the metadata for an uncustomized organization in the Office Excel file called EntityMetadata.xlsx included in the top-level folder of the SDK. Download the SDK

    Else-

    You can make the feild visblity false by default and on page load write script to retrive logged in user security role and show/hide the feild accordingly (I would not recommand this apprcoh due to security concern)

    Hope the above information will help you to fullfill your requirement.

    Please have a look into community.dynamics.com/.../role-based-forms

    If found useful, please mark the answer as verified

  • Verified answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Salary field in dynamics 365

    Hello,

    Add a field and make it "Field Level Secured", create a security profile for that field and give that profile to "HR" and managers - you will have to do that per user or per team, not per department - docs.microsoft.com/.../field-level-security

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans