+ Start a Discussion
Rebecca Hendricks 9Rebecca Hendricks 9 

Custom Big Objects - Creating XML and Object files

I'm new to developing in Salesforce and am working on the Define Custom Big Objects unit in Trailhead.  I understand that I'm supposed to make Rider_History__b.object file as well as a rider_history.permissionset and package.xml file.  However, I don't know how to actually begin the process on how to get these files created.

I understand that once it's created I can then use the Workbench to upload the zip file into my trailhead environment, but I can't do that until after the files have actually been created.  How do I do that????  Is it done in an Apex class? Or is it done as a different type of item in the Developer Console? Or is it done a completely different way.

Remember, I'm a newb when it comes to this stuff, so you may need to be a bit more specific than with a more experienced developer.
Prashant Pandey07Prashant Pandey07
Hi Rebecca,

To create the xml file you don't have to use any apex class just open notepad++ and create the object file/permissionset and package.xml file.

make sure you put all the file in one folder and the object file extension should be "Your file Name" .OBJECT and the permissionset should be "you permissionset name"..permissionset.

Object File...
 
<?xml version="1.0" encoding="UTF-8"?>  
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">  
   <deploymentStatus>Deployed</deploymentStatus>  
   <fields>  
     <fullName>Start_Location_Lat__c</fullName>  
     <label>Start Location Latitude</label>  
     <required>false</required>  
     <type>Number</type>  
     <unique>false</unique>  
     <scale>4</scale>  
     <precision>7</precision>  
   </fields>  
   <fields>  
     <fullName>Start_Location_Long__c</fullName>  
     <label>Start Location Longitude</label>  
     <required>false</required>  
     <type>Number</type>  
     <unique>false</unique>  
     <scale>4</scale>  
     <precision>7</precision>  
   </fields>  
   <fields>  
     <fullName>Start_Time__c</fullName>  
     <label>Start Time</label>  
     <required>True</required>  
     <type>DateTime</type>  
     </fields>  
   <fields>  
     <fullName>End_Time__c</fullName>  
     <label>End Time</label>  
     <required>false</required>  
     <type>DateTime</type>  
     </fields>  
   <fields>  
     <fullName>Service_Type__c</fullName>  
     <label>Service Type</label>  
     <length>16</length>  
     <required>false</required>  
     <type>Text</type>  
     <unique>false</unique>  
   </fields>  
   <fields>  
     <fullName>Rider_Account__c</fullName>  
     <label>Rider Account</label>  
     <length>16</length>  
     <required>true</required>  
     <type>Text</type>  
     <unique>false</unique>  
   </fields>  
   <fields>  
     <fullName>Rider_Rating__c</fullName>  
     <label>Rider Rating</label>  
     <required>false</required>  
     <type>Number</type>  
     <unique>false</unique>  
     <scale>1</scale>  
     <precision>2</precision>  
   </fields>  
   <indexes>  
     <fullName>Rider_History_Index</fullName>  
     <label>Rider History Index</label>  
     <fields>  
       <name>Rider_Account__c</name>  
       <sortDirection>DESC</sortDirection>  
     </fields>  
     <fields>  
       <name>Start_Time__c</name>  
       <sortDirection>ASC</sortDirection>  
     </fields>  
   </indexes>  
   <label>Rider History</label>  
   <pluralLabel>Rider Historys</pluralLabel>  
</CustomObject>

PermissionSet File
 
<?xml version="1.0" encoding="UTF-8"?>  
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">  
<label>Rider History Big Object</label>  
 <fieldPermissions>  
     <editable>true</editable>  
     <field>Rider_History__b.Start_Location_Lat__c</field>  
     <readable>true</readable>  
   </fieldPermissions>  
   <fieldPermissions>  
     <editable>true</editable>  
     <field>Rider_History__b.Start_Location_Long__c</field>  
     <readable>true</readable>  
   </fieldPermissions>  
   <fieldPermissions>  
     <editable>true</editable>  
     <field>Rider_History__b.End_Time__c</field>  
     <readable>true</readable>  
   </fieldPermissions>  
   <fieldPermissions>  
     <editable>true</editable>  
     <field>Rider_History__b.Service_Type__c</field>  
     <readable>true</readable>  
   </fieldPermissions>  
   <fieldPermissions>  
     <editable>true</editable>  
     <field>Rider_History__b.Rider_Rating__c</field>  
     <readable>true</readable>  
   </fieldPermissions>   
</PermissionSet>

Package.XML File
 
<?xml version="1.0" encoding="UTF-8"?>  
<Package xmlns="http://soap.sforce.com/2006/04/metadata">  
   <types>  
     <members>*</members>  
     <name>CustomObject</name>  
   </types>  
   <types>  
     <members>*</members>  
     <name>PermissionSet</name>  
   </types>  
   <version>41.0</version>  
</Package>

Object File 
Object File

PermissionSet File 

Permissionset
 
Gabriel Patrick SalasGabriel Patrick Salas
OK so i was able to solve the problem declaratively WITHOUT workbench so fast.....here are the steps


1. setup - Big Objects
2. Click New to create a big object. 
3. and plugin all the challenge requirements manually rather than using work bench or xml files. 

this will literally take 5 mins lol 

this is by far the best answer. trust me.

you're welcome. 
Neha Arora 50Neha Arora 50

Hi Prashant,

I have done same steps for creating CUSTOM OBJECT and it's fields (without including indexes tags and permission set file) and deployed through workbench, it was deployed successfully but object was not created in the org and so its fields. I have tried 2 approaches for creating that
1. specified the object information in object file and deployed and
2. created the object into the org and only deploy its fields
in both cases zip file was deployed successfully, but in 1st case object was not created and in 2nd case fields were not created

It will be very helpful if you can specify the sample object file to create custom object and its fields.
I am attaching the screenshot of successful deployment

User-added image

Alos I have tried to create them through spreadsheet, mapped all the field's data type but neither I could not specify the required attribute for the fields, nor add more than 10 fields on the layout. Also it was failed to store picklist values.

Any help would be appricated.
Thank you.