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 CRM (Archived)

Field Security Profiles with Javascript

(0) ShareShare
ReportReport
Posted on by 630

Hello Dears,

I have the following scenario where I hope someone can help me.

I have a secured field which is secured by field security profile for some users to prevent read its value.

The problem is that I need to read this field's value in javascript and do some logic based on it, but it since the logged in user doesn't have privilege to read this field value, the Xrm.Page.getAttribute(<securedfieldname>).getValue(); returns null, which means I can't read it. 

Is there any way to read the field's value in javascript but keeping it secured on form and advanced find?

Thank you for your help in advance.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Nadeeja Bomiriya Profile Picture
    6,804 on at

    Hi Osama,

    +1 for Guido's answer.  If you can read a secure value in JavaScript then security is breached.

    But you can call a Custom Action from JavaScript which runs on server side and get it to return a response.  You write the trigger in JavaScript (Client-side) and the logic in Custom Action (Server-side) which you can configure to run under a different user's context.

    IMPORTANT: Never return sensitive data back to JavaScript.

    blogs.microsoft.co.il/.../executing-custom-action-via-javascript

    www.magnetismsolutions.com/.../Call-Action-in-CRM-2015-Easily-from-JavaScript-Library

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans