Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to get masked field value from crm to HTML using Odata Query

Posted on by Microsoft Employee

Hi,

I have one custom entity where I need to store phone number but I don't want it to visible to other user so I have masked that field. Now it is working fine in CRM no other user can view that phone number except Admin.

But my requirement is to fetch that entity details along with Phone field to Html page using Odata Query. Other fields are giving their proper value but Phone is giving null value.

I need help, how can I get that masked field value in my html page.

Thanks & Regards,

ved pathak

*This post is locked for comments

  • Suggested answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: How to get masked field value from crm to HTML using Odata Query

    Hi

    Why dont you apply field level security for the phone number field.

    Remove read only for other user. Admin has always capable to read it.

  • Suggested answer
    tw0sh3ds Profile Picture
    tw0sh3ds 5,600 on at
    RE: How to get masked field value from crm to HTML using Odata Query

    Hi,

    So you are system admin or not? If you are system admin then this value should be returned in service call for you. Have you added yourself to proper security profile?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to get masked field value from crm to HTML using Odata Query

    Hi Pawel,

    Thanks for your valuable response. My requirement is to not to show phone number of customers to other users except admin, but as per your suggestion if I hide that fields then it can be visible through Advance find so this solution won't work.

    I want that field to be readable only in my html web resource to get access of it. So this way only I can get that field value but will not show on html form.

    I hope now you can understand my exact requirements.

    Thanks,

    ved pathak

  • Suggested answer
    tw0sh3ds Profile Picture
    tw0sh3ds 5,600 on at
    RE: How to get masked field value from crm to HTML using Odata Query

    Hi,

    I'm assuming that this HTML page is a web resource in CRM and you are calling it in a context of current CRM user? So users can access this value anyway, what's then the point of securing it?

    To answer you question - you can create a custom Action, create a plugin for this action that will run in a context of an Administrator and returning this phone number in this action. You can then call this action in Javascript.

    But I still think that your design is bad - you forbid user access to the field and now you are enabling them access (maybe not through CRM form, but everyone will be able to access). What's the point of that? Can you just hide the field on the form for users other than admin? Because they will be able to check this field anyway. Can you explain your desing a little bit more? Maybe exact business requirement?

  • Suggested answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: How to get masked field value from crm to HTML using Odata Query

    Hi

    Did you check your database whether phone field has exact same phone number field in the table?

    www.powerobjects.com/.../formatting-a-phone-field-in-crm-2013

    mahadeomatre.blogspot.in/.../mask-phone-number-date-fields-in-crm.html

    alagunellaikumar.blogspot.in/.../password-masking-in-crm-2015.html

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans