Export (0) Print
Expand All

Customize entity forms

Applies To: Microsoft Dynamics CRM 2013, Microsoft Dynamics CRM Online

Forms provide the user interface people use to create, view or edit entity records. Use the form designer in the customization tools to create and edit entity forms.

See the customization guide topic Create and design forms for information about tasks related to working with forms in the application.

This topic will provide information necessary to create or edit forms programmatically.

In This Topic

Access form definitions

Entity forms are stored in the SystemForm entity along with dashboards and visualizations. There are two ways that you can inspect the form definitions for an entity:

  • Include the entity in an unmanaged solution and export the solution.

  • Query the SystemForm entity

View FormXML from an exported entity

Only definitions of system entity forms that have been customized are included in exported managed solution. To view the definition of a system entity form you must either modify it on some way or chose to create a new form by saving the existing form with a new name.

After you export the solution, extract the contents and view the customizations.xml file. You will find the definition of the forms in ImportExportXml > Entities > Entity > FormXml. Within the <FormXml> (FormXml) node you will find each type of form is grouped within a <forms> (FormXml) element with the type attribute specifying the type of form.

Form properties

The following table describes key SystemForm entity attributes and the corresponding data included in the XML elements exported with the solution.

 

SystemForm property FormXML element Description

AncestorFormId

<Ancestor> (FormXml)

Unique identifier of the parent form.This is set when you choose to create a new form by creating a form by using Save As for an existing form or by using CopySystemFormRequest.

CanBeDeleted

<CanBeDeleted> (FormXml)

Information that specifies whether this component can be deleted.This managed property is only applied if the form was created by importing a managed solution.

Description

<Descriptions> (FormXml)

Description is a string and <Descriptions> (FormXml) contains any localized labels for the description of the form.

The localized labels can be retrieved using the RetrieveLocLabelsRequest.

FormActivationState

<FormActivationState> (FormXml)

Specifies the state of the form.

Only forms of type ‘main’ can be deactivated.

Valid Values:

  • 0 : Inactive

  • 1 : Active

FormId

<formid> (FormXml)

Unique identifier of the form

FormPresentation

<FormPresentation> (FormXml)

Specifies whether this form is in the updated UI layout in Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online.

FormXml

<form> (FormXml)

XML representation of the form layout.

See descendants of the <form> (FormXml) element in the Form XML reference for details about the structure of the form.

IntroducedVersion

<IntroducedVersion> (FormXml)

Version in which the form is introduced.

This is the version of the solution that the form was added in.

IsAIRMerged

N/A

Specifies whether this form is merged with the updated UI layout in Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online

IsCustomizable

<IsCustomizable> (FormXml)

Information that specifies whether this component can be customized.

This managed property is only applied if the form was created by importing a managed solution.

IsDefault

N/A

Information that specifies whether the form or the dashboard is the system default.

Name

<LocalizedNames> (FormXml)

Name is a string and <Descriptions> (FormXml) contains any localized labels for the name of the form.

The localized labels can be retrieved using the RetrieveLocLabelsRequest.

ObjectTypeCode

The form is a decedent of the Entity element.

The ObjectTypeCode value is the entity logical name.

Type

<forms> (FormXml) element type attribute

Valid Values for forms:

  • 2 : main

  • 5 : mobile

  • 6 : quick

  • 7 : quickCreate

Create and edit forms

You can only create new forms for entity where EntityMetadata. CanCreateForms allows it.

You can create new forms using either a CreateRequest or the CopySystemFormRequest. When using CopySystemFormRequest or using Save As in the form editor, note that there is no inheritance between forms. Therefore, changes to the base form will not automatically be applied to any forms created from it.

Editing the form definitions from an exported managed solution and then re-importing the solution is a supported method to edit entity forms. When manually editing forms we strongly recommend you use an XML editor that allows for schema validation. See Edit the customizations XML file with schema validation for more information.

See Also

Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.
Show:
© 2014 Microsoft