function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arthur Santos AlmeidaArthur Santos Almeida 

How to deploy standard field?

in my sandbox, the Campaign Member object has a field AccountId, and this field does not is custom, he does not have "__c", he is standard!
 
and in my production, the Campaign Member object does not has a field AccountId
 
So, I need to deploy this field to my production, how to deploy the standard field?
 
Via SFDX does not work:
Error  CampaignMember.AccountId     fullName must end with: __c or __kav or __x or __b or __e or __p or __mdt or __dll or __dlm

And via Change Set does not work too: https://developer.salesforce.com/forums/?id=9060G000000I24dQAC (http://And via Change Set does not work too: https://developer.salesforce.com/forums/?id=9060G000000I24dQAC)
Best Answer chosen by Arthur Santos Almeida
Arthur Santos AlmeidaArthur Santos Almeida
Search for "Accounts As Campaign Member" In setup
Change the radio button to enable.
The field will be visible in the campaign member

User-added image

All Answers

VinayVinay (Salesforce Developers) 
Hi Arthur,

There is a limitation of deploying standard field,  can you try deploying CampaignMember object and see.  Kindly do it in your lower instance to check behaviour.
<types>
<members>CampaignMember</members>
<name>CustomObject</name>
</types>

Please mark as Best Answer if above information was helpful.

Thanks,
Arthur Santos AlmeidaArthur Santos Almeida
Search for "Accounts As Campaign Member" In setup
Change the radio button to enable.
The field will be visible in the campaign member

User-added image
This was selected as the best answer