Newer Version Available

This content describes an older version of this product. View Latest

Metadata API Example (Beta)

To create a custom address field on an object, use Metadata API.

This feature is a Beta Service. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms.

Before you create a custom address field, review the Custom Address Fields (Beta) Requirements and Limitations. To discuss the feature and ask questions, join the Custom Address Fields Beta Program group on the Trailblazer Community.

Note

This example creates a custom object of type Address on the Account object.
1<?xml version="1.0" encoding="UTF-8"?>
2<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">       
3    <fields>
4        <fullName>MailingAddress__c</fullName>
5        <externalId>false</externalId>
6        <label>Mailing Address</label>
7        <required>false</required>
8        <type>Address</type>
9        <unique>false</unique>
10   </fields>
11 </CustomObject>