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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How do we select required fields from an Attributes using the rest api

(0) ShareShare
ReportReport
Posted on by 15

We are using the rest api robomqdev.crm.dynamics.com/.../EntityDefinitions(LogicalName='account')/Attributes to get the attributes of account. Now after getting the result we want to know which field is required or not. There is 'IsRequiredForForm' which we are getting from the result but when we match it with crm by login into the UI its getting the wrong result. So in our case 'IsRequiredForForm' is not working. Any one can help us to identify how we can know which field is required.

Thanks in advanced.

 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    AttributeMetadata.RequiredLevel is the field you need to get or set what you want

    This property is required for the CreateAttributeRequest message.

    It can be specified for the UpdateAttributeRequest message.

    The following values are valid when you create an attribute.

    1. None - Means Optional
    2. Recommended
    3. ApplicationRequired

    https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg307513%28v%3dcrm.8%29

    https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg327644(v%3Dcrm.8)

    The IsRequiredForForm property you mentioned, seems to have been introduced only on V9. And the property is listed and but the documentation does not describe the purpose of use of it.  I think at least for now this field only for internal use and its most likely that based on this property CRM form designer may not allow removing certain fields from the form.

    ScreenClip-_5B00_495_5D00_.png

    https://docs.microsoft.com/en-us/dotnet/api/microsoft.xrm.sdk.metadata.attributemetadata?view=dynamics-general-ce-9

  • Prabhakar paliwal Profile Picture
    15 on at

    Thanks a lot it works!!

    Few more questions want to know about

    1. How to know which field is valid for update. Like for Accout there is AccountNumber which is not supposed to update by User. Again 'IsValidForUpdate' is not work as exptected.

    2. How to know the id fields for the lookup tables.  

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    Please see below

    1. How to know which field is valid for update. Like for Accout there is AccountNumber which is not supposed to update by User. Again 'IsValidForUpdate' is not work as expected.

    AccountNumber field can be updated and IsValidForUpdate is the correct attribute for this.

    [View:https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg307510(v%3Dcrm.8):750:50]

    ScreenClip-_5B00_503_5D00_.png

    I have tried updating AccountNumber using Bulk Data Updater plugin on XrmToolBox and it updates the account number.

    2. How to know the id fields for the lookup tables.  

    (logicalname + "id") ->  will always be the id column name of the entity referenced by the lookup field

  • Prabhakar paliwal Profile Picture
    15 on at

    Thank you so much for quick response.

    For the second one after checking I think its (EntityLogicalName + "id"). Please correct if I am wrong.

  • Kokulan Profile Picture
    18,054 on at

    Yes that's correct

  • Prabhakar paliwal Profile Picture
    15 on at

    One another question related to Privilege. Since there are so many entities in dynamics365 (around 500+) but users have limited access to these entities. Is there any field so we can identify that for particular entity user have not sufficient privilege.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans