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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Get list of fields in forms

(0) ShareShare
ReportReport
Posted on by 760

Hi,

Is there a way I can get the list of fields including the fields in the tables in the form? 

Aside from excel templates

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Syed Ibrahim Profile Picture
    6,257 on at
    RE: Get list of fields in forms

    Yes. You can export all the metadata and fields requirements, description etc using metadata extractor in XrmToolBox tool. You can download using below url.

    https://www.xrmtoolbox.com/

  • Suggested answer
    Srujan K Profile Picture
    317 on at
    RE: Get list of fields in forms

    Not sure if this is the best way, But you can follow the below steps.

    1.  Update the data in all the fields present on the form.

    2.  From Advanced Find, Export the record with all the columns.

    3.  Delete the columns without data from the excel and the row with data.

    4. Copy paste the row with column names in excel using 'Transpose' Option , You will get the list of columns on the Form.

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at
    RE: Get list of fields in forms

    Probably XRMToolbox would be the easiest way to do this, but in case you want to use the SDK, you can use the following code:

           public void GetAttributes(string entityName)

           {

               RetrieveEntityRequest request = new RetrieveEntityRequest()

               {

                   LogicalName = entityName,

                   EntityFilters = EntityFilters.All,

                   RetrieveAsIfPublished = true

               };

               RetrieveEntityResponse response = (RetrieveEntityResponse)service.Execute(request);

               GetAttributes(response.EntityMetadata.Attributes);

           }

           private void CreateAttributes(AttributeMetadata[] metadata)

           {

               // This will also get the Virtual Attributes

               foreach (AttributeMetadata attr in metadata)

               {

                   string logicalName = attr.LogicalName;

                   string attrType = attr.AttributeType.ToString();

                   string displayName = attr.DisplayName.LocalizedLabels.Count > 0 ? attr.DisplayName.LocalizedLabels[0].Label : string.Empty;

                   bool isPrimary = false;

                   if (attr.IsPrimaryId.HasValue && attr.IsPrimaryId.Value == true)

                       isPrimary = true;

                   else if (attr.IsPrimaryName.HasValue && attr.IsPrimaryName.Value == true)

                       isPrimary = true;

               }

           }

  • Suggested answer
    Srikanta Mahapatro Profile Picture
    190 on at
    RE: Get list of fields in forms

    Hi,

    Connect to XRMToolBox for dynamics 365.

    Open the Metadata Document Generator

    Select the "All attributed Contained in Form" from for "Generate For" attribute selection

    On Right side you will got the list of Form name

    select the desired form and download

    5758.Attributes.PNG

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at
    RE: Get list of fields in forms

    Agree with Srikanta, used this option couple of times.

    instructions here : carldesouza.com/xrmtoolbox-metadata-document-generator

  • shivat Profile Picture
    15 on at
    RE: Get list of fields in forms

    It's not working when we select that option. try that option and let us know . 

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
Wayne Walton Profile Picture

Wayne Walton 2

#2
Good.Panos Profile Picture

Good.Panos 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans