Help us shape the future of Go! Take the 2026 Go Developer Survey

objects

package
v0.68.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const NAME = "CustomObject"

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionOverride

type ActionOverride struct {
	ActionName           string       `xml:"actionName"`
	Comment              *string      `xml:"comment"`
	Content              *string      `xml:"content"`
	FormFactor           *string      `xml:"formFactor"`
	SkipRecordTypeSelect *BooleanText `xml:"skipRecordTypeSelect"`
	Type                 string       `xml:"type"`
}

type ActionOverrideFilter

type ActionOverrideFilter func(ActionOverride) bool

type ArticleTypeChannelDisplay added in v0.60.0

type ArticleTypeChannelDisplay struct {
	ArticleTypeTemplates []struct {
		Channel  TextLiteral  `xml:"channel"`
		Page     *TextLiteral `xml:"page"`
		Template TextLiteral  `xml:"template"`
	} `xml:"articleTypeTemplates"`
}

type ChildComponentProvider

type ChildComponentProvider interface {
	Items(metadataType string) []metadata.RegisterableMetadata
}

ChildComponentProvider provides access to child components for composition

type CustomObject

type CustomObject struct {
	metadata.MetadataInfo
	XMLName              xml.Name         `xml:"CustomObject"`
	Xmlns                string           `xml:"xmlns,attr"`
	ActionOverrides      []ActionOverride `xml:"actionOverrides"`
	AllowInChatterGroups *struct {
		Text string `xml:",chardata"`
	} `xml:"allowInChatterGroups"`
	ArticleTypeChannelDisplay *ArticleTypeChannelDisplay        `xml:"articleTypeChannelDisplay"`
	BusinessProcesses         []businessprocess.BusinessProcess `xml:"businessProcesses"`
	CompactLayoutAssignment   *struct {
		Text string `xml:",chardata"`
	} `xml:"compactLayoutAssignment"`
	CompactLayouts []compactlayout.CompactLayout `xml:"compactLayouts"`
	CustomHelpPage *struct {
		Text string `xml:",chardata"`
	} `xml:"customHelpPage"`
	CustomSettingsType *struct {
		Text string `xml:",chardata"`
	} `xml:"customSettingsType"`
	// CustomSettingsVisibility is a custom setting's visibility in API
	// versions before 47.0, which replaced it with visibility.
	CustomSettingsVisibility *TextLiteral `xml:"customSettingsVisibility"`
	DeploymentStatus         *struct {
		Text string `xml:",chardata"`
	} `xml:"deploymentStatus"`
	Deprecated *struct {
		Text string `xml:",chardata"`
	} `xml:"deprecated"`
	Description *struct {
		Text string `xml:",innerxml"`
	} `xml:"description"`
	EnableActivities *struct {
		Text string `xml:",chardata"`
	} `xml:"enableActivities"`
	EnableBulkApi *struct {
		Text string `xml:",chardata"`
	} `xml:"enableBulkApi"`
	EnableChangeDataCapture *BooleanText `xml:"enableChangeDataCapture"`
	EnableDivisions         *struct {
		Text string `xml:",chardata"`
	} `xml:"enableDivisions"`
	EnableEnhancedLookup *struct {
		Text string `xml:",chardata"`
	} `xml:"enableEnhancedLookup"`
	EnableFeeds *struct {
		Text string `xml:",chardata"`
	} `xml:"enableFeeds"`
	EnableHistory *struct {
		Text string `xml:",chardata"`
	} `xml:"enableHistory"`
	EnableLicensing *struct {
		Text string `xml:",chardata"`
	} `xml:"enableLicensing"`
	EnableReports *struct {
		Text string `xml:",chardata"`
	} `xml:"enableReports"`
	EnableSearch *struct {
		Text string `xml:",chardata"`
	} `xml:"enableSearch"`
	EnableSharing *struct {
		Text string `xml:",chardata"`
	} `xml:"enableSharing"`
	EnableStreamingApi *struct {
		Text string `xml:",chardata"`
	} `xml:"enableStreamingApi"`
	EventType *struct {
		Text string `xml:",chardata"`
	} `xml:"eventType"`
	// ExternalDataSource, ExternalName and ExternalRepository are present on
	// external objects (__x): the data source that serves the object, the
	// object's name in the external system, and its repository.
	ExternalDataSource *struct {
		Text string `xml:",chardata"`
	} `xml:"externalDataSource"`
	ExternalName *struct {
		Text string `xml:",chardata"`
	} `xml:"externalName"`
	ExternalRepository *struct {
		Text string `xml:",chardata"`
	} `xml:"externalRepository"`
	ExternalSharingModel *struct {
		Text string `xml:",chardata"`
	} `xml:"externalSharingModel"`
	FieldSets []fieldset.FieldSet `xml:"fieldSets"`
	Fields    FieldList           `xml:"fields"`
	Indexes   IndexList           `xml:"indexes"`
	Label     *struct {
		Text string `xml:",chardata"`
	} `xml:"label"`
	ListViews ListViewList `xml:"listViews"`
	// MktDataLakeAttributes is present on Data Cloud Data Lake Objects
	// (__dll); MktDataModelAttributes on Data Model Objects (__dlm).
	MktDataLakeAttributes  *MktDataLakeAttributes  `xml:"mktDataLakeAttributes"`
	MktDataModelAttributes *MktDataModelAttributes `xml:"mktDataModelAttributes"`
	NameField              *struct {
		DisplayFormat *struct {
			Text string `xml:",chardata"`
		} `xml:"displayFormat"`
		EncryptionScheme *TextLiteral `xml:"encryptionScheme"`
		Label            struct {
			Text string `xml:",chardata"`
		} `xml:"label"`
		// StartingNumber is an auto-number Name field's first number.
		StartingNumber   *IntegerText `xml:"startingNumber"`
		TrackFeedHistory *struct {
			Text string `xml:",chardata"`
		} `xml:"trackFeedHistory"`
		TrackHistory *struct {
			Text string `xml:",chardata"`
		} `xml:"trackHistory"`
		Type struct {
			Text string `xml:",chardata"`
		} `xml:"type"`
	} `xml:"nameField"`
	NamedFilters []NamedFilter `xml:"namedFilters"`
	PluralLabel  *struct {
		Text string `xml:",chardata"`
	} `xml:"pluralLabel"`
	ProfileSearchLayouts []struct {
		Fields []struct {
			Text string `xml:",chardata"`
		} `xml:"fields"`
		ProfileName struct {
			Text string `xml:",chardata"`
		} `xml:"profileName"`
	} `xml:"profileSearchLayouts"`
	PublishBehavior *struct {
		Text string `xml:",chardata"`
	} `xml:"publishBehavior"`
	RecordTypeTrackFeedHistory *struct {
		Text string `xml:",chardata"`
	} `xml:"recordTypeTrackFeedHistory"`
	RecordTypeTrackHistory *struct {
		Text string `xml:",chardata"`
	} `xml:"recordTypeTrackHistory"`
	RecordTypes   []recordtype.RecordType `xml:"recordTypes"`
	SearchLayouts *struct {
		CustomTabListAdditionalFields []struct {
			Text string `xml:",chardata"`
		} `xml:"customTabListAdditionalFields"`
		ExcludedStandardButtons []struct {
			Text string `xml:",chardata"`
		} `xml:"excludedStandardButtons"`
		ListViewButtons []struct {
			Text string `xml:",chardata"`
		} `xml:"listViewButtons"`
		LookupDialogsAdditionalFields []struct {
			Text string `xml:",chardata"`
		} `xml:"lookupDialogsAdditionalFields"`
		LookupFilterFields []struct {
			Text string `xml:",chardata"`
		} `xml:"lookupFilterFields"`
		LookupPhoneDialogsAdditionalFields []struct {
			Text string `xml:",chardata"`
		} `xml:"lookupPhoneDialogsAdditionalFields"`
		MassQuickActions   []TextLiteral `xml:"massQuickActions"`
		SearchFilterFields []struct {
			Text string `xml:",chardata"`
		} `xml:"searchFilterFields"`
		SearchResultsAdditionalFields []struct {
			Text string `xml:",chardata"`
		} `xml:"searchResultsAdditionalFields"`
		SearchResultsCustomButtons []struct {
			Text string `xml:",chardata"`
		} `xml:"searchResultsCustomButtons"`
	} `xml:"searchLayouts"`
	SharingModel *struct {
		Text string `xml:",chardata"`
	} `xml:"sharingModel"`
	SharingReasons []sharingreason.SharingReason `xml:"sharingReasons"`
	StartsWith     *struct {
		Text string `xml:",chardata"`
	} `xml:"startsWith"`
	ValidationRules validationrule.ValidationRuleList `xml:"validationRules"`
	Visibility      *struct {
		Text string `xml:",chardata"`
	} `xml:"visibility"`
	WebLinks []weblink.WebLink `xml:"webLinks"`
}

func ComposeFromChildren

func ComposeFromChildren(objectName string, provider ChildComponentProvider) *CustomObject

ComposeFromChildren creates a composed CustomObject by merging child components from a provider. This is used when converting from source format (where components are separate) to metadata format.

func Open

func Open(path string) (*CustomObject, error)

func (*CustomObject) AddBlankPicklistOptionsToRecordType

func (o *CustomObject) AddBlankPicklistOptionsToRecordType(fieldName string, recordType string) error

func (*CustomObject) AddField

func (o *CustomObject) AddField(fieldName string) error

func (*CustomObject) AddFieldPicklistValue

func (o *CustomObject) AddFieldPicklistValue(fieldName string, recordType string, picklistValue string) error

func (*CustomObject) AddPicklistValue

func (o *CustomObject) AddPicklistValue(fieldName string, picklistValue string, recordTypes []string) error

func (*CustomObject) CloneField

func (o *CustomObject) CloneField(sourceFieldName string, targetFieldName string) error

func (*CustomObject) DeleteField

func (p *CustomObject) DeleteField(fieldName string) error

func (*CustomObject) DeleteFieldFromCompactLayouts

func (p *CustomObject) DeleteFieldFromCompactLayouts(fieldName string)

func (*CustomObject) DeleteFieldPicklistValues

func (p *CustomObject) DeleteFieldPicklistValues(fieldName string)

func (*CustomObject) DeleteFieldSet

func (p *CustomObject) DeleteFieldSet(fieldSetName string) error

func (*CustomObject) DeleteRecordType

func (o *CustomObject) DeleteRecordType(recordType string) error

func (*CustomObject) DeleteRule

func (p *CustomObject) DeleteRule(ruleName string) error
func (p *CustomObject) DeleteWebLink(webLinkName string) error

func (*CustomObject) Files

func (c *CustomObject) Files(format metadata.Format) (map[string][]byte, error)

func (*CustomObject) GetActionOverrides

func (o *CustomObject) GetActionOverrides(filters ...ActionOverrideFilter) []ActionOverride

func (*CustomObject) GetFieldSets

func (o *CustomObject) GetFieldSets() []fieldset.FieldSet

func (*CustomObject) GetFields

func (o *CustomObject) GetFields(filters ...field.FieldFilter) []field.Field

func (*CustomObject) GetIndexes

func (o *CustomObject) GetIndexes(filters ...index.IndexFilter) []index.BigObjectIndex

func (*CustomObject) GetRecordTypes

func (o *CustomObject) GetRecordTypes(filters ...recordtype.RecordTypeFilter) []recordtype.RecordType

func (*CustomObject) GetValidationRules

func (p *CustomObject) GetValidationRules() validationrule.ValidationRuleList
func (o *CustomObject) GetWebLinks() []weblink.WebLink

func (*CustomObject) ListPicklistOptions

func (o *CustomObject) ListPicklistOptions(fieldName string) ([]string, error)

func (*CustomObject) RemoveFieldPicklistValue

func (o *CustomObject) RemoveFieldPicklistValue(fieldName string, recordType string, picklistValue string) error

func (*CustomObject) SetMetadata

func (c *CustomObject) SetMetadata(m metadata.MetadataInfo)

func (*CustomObject) Tidy

func (p *CustomObject) Tidy()

func (*CustomObject) Type

func (*CustomObject) UpdateField

func (o *CustomObject) UpdateField(fieldName string, updates field.Field) error

type FieldList

type FieldList []field.Field

func (FieldList) Tidy

func (fields FieldList) Tidy()

type IndexList

type IndexList []index.BigObjectIndex

type ListViewList

type ListViewList []listview.ListView

type MktDataLakeAttributes added in v0.52.0

type MktDataLakeAttributes struct {
	CreationType *struct {
		Text string `xml:",chardata"`
	} `xml:"creationType"`
	DataSource *struct {
		Text string `xml:",chardata"`
	} `xml:"dataSource"`
	IsEnabled *struct {
		Text string `xml:",chardata"`
	} `xml:"isEnabled"`
	Label *struct {
		Text string `xml:",chardata"`
	} `xml:"label"`
	ObjectCategory *struct {
		Text string `xml:",chardata"`
	} `xml:"objectCategory"`
}

type MktDataModelAttributes added in v0.52.0

type MktDataModelAttributes struct {
	CreationType *struct {
		Text string `xml:",chardata"`
	} `xml:"creationType"`
	DataModelTaxonomy *struct {
		Text string `xml:",chardata"`
	} `xml:"dataModelTaxonomy"`
	DataSpaceName *struct {
		Text string `xml:",chardata"`
	} `xml:"dataSpaceName"`
	IsEnabled *struct {
		Text string `xml:",chardata"`
	} `xml:"isEnabled"`
	IsSegmentable *struct {
		Text string `xml:",chardata"`
	} `xml:"isSegmentable"`
	IsSqlDmo *struct {
		Text string `xml:",chardata"`
	} `xml:"isSqlDmo"`
	IsUsedForMetrics *struct {
		Text string `xml:",chardata"`
	} `xml:"isUsedForMetrics"`
	LabelOverride *struct {
		Text string `xml:",chardata"`
	} `xml:"labelOverride"`
	MasterLabel *struct {
		Text string `xml:",chardata"`
	} `xml:"masterLabel"`
	ObjectCategory *struct {
		Text string `xml:",chardata"`
	} `xml:"objectCategory"`
}

type NamedFilter added in v0.60.0

type NamedFilter struct {
	FullName      string       `xml:"fullName"`
	Active        *BooleanText `xml:"active"`
	BooleanFilter *TextLiteral `xml:"booleanFilter"`
	Description   *TextLiteral `xml:"description"`
	ErrorMessage  *TextLiteral `xml:"errorMessage"`
	Field         *TextLiteral `xml:"field"`
	FilterItems   []struct {
		Field      TextLiteral  `xml:"field"`
		Operation  TextLiteral  `xml:"operation"`
		Value      *TextLiteral `xml:"value"`
		ValueField *TextLiteral `xml:"valueField"`
	} `xml:"filterItems"`
	InfoMessage  *TextLiteral `xml:"infoMessage"`
	IsOptional   *BooleanText `xml:"isOptional"`
	Name         *TextLiteral `xml:"name"`
	SourceObject *TextLiteral `xml:"sourceObject"`
}

NamedFilter is a lookup filter in API versions before 30.0, which moved lookup filters into the lookupFilter element of the field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL