ApexComponent

Represents the saved copy of a Visualforce component. ApexComponent uses the cached version of the class unless one is unavailable.

To edit, save, or compile Visualforce components, use ApexComponentMember.

Version 

Introduced in API version 12.0.

Supported SOAP API Calls 

create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), update(), upsert()

Supported REST API Methods 

DELETE, GET, HEAD, PATCH, POST, Query

Fields 

ApiVersion 

  • Type: double
  • Required: No
  • Properties: Create, Filter, Sort, Update

ControllerKey 

  • Type: string
  • Required: No
  • Properties: Create, Filter, Group, Nillable, Sort, Update

ControllerType 

  • Type: picklist

  • Required: No

  • Properties: Create, Filter, Group, Restricted picklist, Sort, Update

  • Possible values:

    • 0 — Not Specified

    • 1 — Standard

    • 4 — Standard Set

    • 2 — Custom

    • 3 — Java

    • 5 — Spring

Description 

  • Type: textarea
  • Required: No
  • Properties: Create, Filter, Nillable, Sort, Update

ManageableState 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Description: Indicates the manageable state of the specified component that is contained in a package:

  • beta

  • deleted

  • deprecated

  • deprecatedEditable

  • installed

  • installedEditable

  • released

  • unmanaged

This field is available in API version 38.0 and later.

  • Possible values:

    • beta — beta

    • deleted — deleted

    • deprecated — deprecated

    • deprecatedEditable — deprecatedEditable

    • installed — installed

    • installedEditable — installedEditable

    • released — released

    • unmanaged — unmanaged

Markup 

  • Type: textarea
  • Required: No
  • Properties: Create, Update

MasterLabel 

  • Type: string

  • Required: No

  • Properties: Create, Filter, Group, Sort, Update

  • Description: Label for the Visualforce Component. In the UI, this field is MasterLabel.

Name 

  • Type: string
  • Required: No
  • Properties: Create, Filter, Group, idLookup, Sort, Update

NamespacePrefix 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The namespace prefix associated with this object. Each Developer Edition organization that creates a managed package has a unique namespace prefix. Limit: 15 characters. You can refer to a component in a managed package by using the namespacePrefix__componentName notation.

The namespace prefix can have one of the following values:

  • In Developer Edition organizations, the namespace prefix is set to the namespace prefix of the organization for all objects that support it. There is an exception if an object is in an installed managed package. In that case, the object has the namespace prefix of the installed managed package. This field’s value is the namespace prefix of the Developer Edition organization of the package developer.
  • In organizations that are not Developer Edition organizations, NamespacePrefix is only set for objects that are part of an installed managed package. There is no namespace prefix for all other objects.

Usage 

To retrieve information about a Visualforce component, create an ApexComponent object that references it. For example code, see SOAP Calls.

To edit, save, or compile Visualforce components, use ApexComponentMember.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!