0

I'm trying to deploy a big object to Salesforce but there are some errors with the object's fields. The big object is based on a standard object that already exists in salesforce and has some standard fields that are from the original object. When I remove these standard fields from the object file, the package deploys successfully, but when I include the standard fields, the following error displays for each field: <field name> must end with: __c or __kav or __x or __b or __xo or __e or __p or __mdt

Object file:

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <deploymentStatus>Deployed</deploymentStatus>
    <fields>
        <fullName>Organization_Name__c</fullName>
        <label>Organization Name</label>
        <length>50</length>
        <required>true</required>
        <type>Text</type>
        <unique>false</unique>
    </fields>

    <fields>
        <fullName>Sales_Rep__c</fullName>
        <label>Sales Rep</label>
        <length>50</length>
        <required>false</required>
        <type>Text</type>
        <unique>false</unique>
    </fields>

    <fields>
        <fullName>Top_Tier_150__c</fullName>
        <label>Top Tier 150</label>
        <required>false</required>
        <length>120</length>
        <type>Text</type>
        <unique>false</unique>
    </fields>

    <fields>
        <fullName>CreatedBy</fullName>
        <required>false</required>
        <referenceTo>User</referenceTo>
        <type>Lookup</type>
    </fields>
    <fields>
        <fullName>LastModifiedBy</fullName>
        <required>false</required>
        <referenceTo>User</referenceTo>
        <type>Lookup</type>
    </fields>
    <fields>
        <fullName>Name</fullName>
        <required>false</required>
        <length>80</length>
        <type>Text</type>
        <unique>false</unique>
    </fields>
    <fields>
        <fullName>Owner</fullName>
        <required>false</required>
        <referenceTo>User, Queue</referenceTo>
        <type>Lookup</type>
    </fields>
    <indexes>
        <fullName>OrgSnapshotIndex</fullName>
        <label>Org Snapshot Index</label>
        <fields>
            <name>Organization_Name__c</name>
            <sortDirection>DESC</sortDirection>
        </fields>
    </indexes>

    <label>Org Snapshot Big Object</label>
    <pluralLabel>Org Snapshots</pluralLabel>
</CustomObject>

The fields in question here are Name, Owner, and LastModifiedBy. For some reason the field CreatedBy deploys successfully even though it is a standard field. What could be causing the errors on the last three fields?

2 Answers 2

1

This is the most complete big object documentation I can find.

Unfortunately this doesn't say anything about what fields are standard for big objects. This documentation does contain a disclaimer:

Note: While custom big objects use the “CustomObject” metadata type, some parameters are unique to big objects and others are not applicable. The specific metadata parameters that apply to big objects are outlined in this document.

This disclaimer leads me to believe that those fields are not standard for big objects. This tells me that you need to create them as custom fields.

As a test, the documentation shows that Field History is stored in standard Big Objects. Looking at the WSDL shows that the fields you're trying to get access to do not exist on these objects:

    <complexType name="OpportunityFieldHistory">
            <complexContent>
                <extension base="ens:sObject">
                    <sequence>
                    <element name="CreatedBy" nillable="true" minOccurs="0" type="ens:Name"/>
                    <element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/>
                    <element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
                    <element name="Field" nillable="true" minOccurs="0" type="xsd:string"/>
                    <element name="IsDeleted" nillable="true" minOccurs="0" type="xsd:boolean"/>
                    <element name="NewValue" nillable="true" minOccurs="0" type="xsd:anyType"/>
                    <element name="OldValue" nillable="true" minOccurs="0" type="xsd:anyType"/>
                    <element name="Opportunity" nillable="true" minOccurs="0" type="ens:Opportunity"/>
                    <element name="OpportunityId" nillable="true" minOccurs="0" type="tns:ID"/>
                    </sequence>
                </extension>
            </complexContent>
        </complexType>

However, the CreatedBy field is standard.

So I'm afraid the answer is, you'll have to define those fields and all the behavior you expect them to have.

3
  • The other two fields weren't showing up in the standard fields section of the big object after it was deployed. Is there an option to retroactively add Last Modified by and Owner? Commented Apr 23, 2018 at 18:55
  • @loremIpsum1771 I did more research and updated my answer.
    – gNerb
    Commented Apr 23, 2018 at 19:08
  • Yeah, that seems like the only way to do it. I'll just determine the correct data that needs to go there elsewhere and then insert into the big object. Commented Apr 23, 2018 at 21:25
2

Although CreatedBy is a standard field in salesforce but when you create this field using big object you have to give api name as createdby__c because for big object it is a custom field and then while mapping you can map this to standard createdby field.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .