Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Get list of fields in forms

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

  • shivat Profile Picture
    shivat 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 . 

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 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

  • Suggested answer
    Srikanta Mahapatro Profile Picture
    Srikanta Mahapatro 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
    Aric Levin Profile Picture
    Aric Levin 30,188 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
    Srujan K Profile Picture
    Srujan K 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
    Syed Ibrahim Profile Picture
    Syed Ibrahim 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/

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans