NewCustomFieldsPayload (metadata/soap-payload.go)

connectors · providers/salesforce/internal/crm/metadata/soap-payload.go · go · MIT
crm, CRM / Leads

Go module building Salesforce metadata payloads for custom fields, handling types and permissions.

// Source: https://github.com/amp-labs/connectors | License: MIT | Copyright 2024 Onset Labs, Inc
// Provided via justclaw.it.com; keep this notice with the code.
package metadata

import (
	"encoding/xml"
	"fmt"
	"strconv"

	"github.com/amp-labs/connectors/common"
	"github.com/amp-labs/connectors/internal/datautils"
)

const (
	// Data type LongTextArea must be at least 256 in length.
	longTextAreaLength     = 256
	fieldTypeText          = "Text"
	fieldTypeLongText      = "LongTextArea"
	defaultNumDisplayLines = 10
)

// UpsertMetadataPayload represents the request body for the Salesforce Metadata API
// `upsertMetadata` operation. It supports creating or updating various metadata specified via [M] generic.
type UpsertMetadataPayload[M any] struct {
	XMLName xml.Name `xml:"upsertMetadata"

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key