UI API
Access User Interface API for record layouts, picklists, and object metadata.
Get Record UI
Go
ui, err := client.UIAPI().GetRecordUI(ctx, recordId, uiapi.FormFactor{
FormFactor: "Large",
Modes: []string{"View", "Edit"},
})
// Access layout, object info, record data in one call
Get Layout
Go
layout, err := client.UIAPI().GetLayout(ctx, "Account", "Full")
for _, section := range layout.Sections {
fmt.Println("Section:", section.Heading)
}
Get Picklist Values
Go
picklist, err := client.UIAPI().GetPicklistValues(ctx, "Account", "Industry")
for _, val := range picklist.Values {
fmt.Printf("%s (%s)\n", val.Label, val.Value)
}
Get Object Info
Go
info, _ := client.UIAPI().GetObjectInfo(ctx, "Account")
fmt.Printf("Label: %s, Plural: %s\n", info.Label, info.LabelPlural)
Available Methods
| Method | Description |
|---|---|
GetRecordUI() |
Get complete record UI |
GetRecord() |
Get record via UI API |
GetLayout() |
Get page layout |
GetPicklistValues() |
Get picklist values |
GetObjectInfo() |
Get object metadata |
GetRecordCreateDefaults() |
Get create defaults |