AnsweredAssumed Answered

XOg custom object instance with autonumbering not working v13

Question asked by joni.campos on May 20, 2013
Latest reply on Jul 23, 2013 by Robert Ensinger
I am trying to use the following gel script to insert a custom object instance but it fails to do that unless I provide de object CODE.

the <args name="overrideAutoNumbering" value="false"/> and <instance instanceCode="-1" should work even if you do not provide the object code ( it is a new object instance ).


Here is the GEL Script:

<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd">
<Header action="write" externalSource="NIKU" objectType="customObjectInstance" version="13.0.1.0102">

<!-- This set Clarity to use the auto numbering scheme -->
<args name="overrideAutoNumbering" value="0"/>

</Header>
<customObjectInstances objectCode="mysubobject">

<!-- The first line set to insert a new instance -->
<instance instanceCode="-1" objectCode="mysubobject" parentInstanceCode="prj0020" parentObjectCode="project">
<CustomInformation>


<ColumnValue name="rdate">2013-05-01T00:00:00</ColumnValue>


<ColumnValue name="name">My Instance Name</ColumnValue>

<ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
</CustomInformation>

</instance>
</customObjectInstances>

</NikuDataBus>


ERROR Message:
<Statistics failureRecords="1" insertedRecords="0" totalNumberOfRecords="1" updatedRecords="0"/>
<Records>
<Record>
<KeyInformation>
<column name="mysubobject">-1</column>
</KeyInformation>
<ErrorInformation>
<Severity>FATAL</Severity>
<Description>com.niku.union.odf.exception.ODFValidationException: Validation failure. Attribute: code. Cause: required</Description>
</ErrorInformation>
</Record>
</Records>

Any idea ?

Outcomes