How to XOG out Partition views for custom objects

Document ID : KB000056518
Last Modified Date : 14/02/2018
Show Technical Document Details
Description:  
How do you generate an XOG XML output that includes the different views defined for each partition unit on a custom object?  We generated a XOG XML outpu for our custom objects from the source server. However, when we performed the XOG write action into the next environment, the objects were created as well as the attributes, but none of our views for the different partition units came over for those custom objects.
  
Steps to Reproduce:
1. Create a partition model
2. Create a custom object and associate with the partition model 
3. Create custom attributes set in the partition created in step 1
4. Add the attribute to the create and edit view in one of the partition units created in step 1.
5. Export the custom object using XOG content_pack_read.xml
6. Examine the XOG XML output file  
 
Result: The views for the partition were not exported from the source system.
 
Solution:
In the content_pack_read.xml file, the viewQuery was not specified. Therefore, the partition unit views were not generated.
In order to get partitioned views these have to be explicitly requested in a viewQuery and that that the query has to include the partition_code. In the content_pack_read.xml file, specify the object_code and partition_code.

<ViewQuery>
    <Filter name="code" criteria="EQUALS">property</Filter>
    <Filter name="object_code" criteria="EQUALS">cust_obj_v1<Filter>
    <Filter name="partition_code" criteria="EQUALS">abc_partition<Filter>
</ViewQuery>
 
Note: If the partition_code is not specified then views for all partitions should be exported. If only the object is specified then only the root partition's views are exported.