AnsweredAssumed Answered

Approve Timesheet XOG Object

Question asked by therockrahul on Apr 3, 2012
Latest reply on Apr 4, 2012 by therockrahul
Hi,

I have timesheets with submitted Status (Status: 1). I want to approve Timesheet through XOG. I am using Timeperiod object for same.

I am getting list of submitted TimeSheet using below input XOGIN xml:
<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
<Header version="12.1.1.1208" action="read" objectType="timeperiod" externalSource="NIKU">
<args name="include_openForTimeEntry" value="true"/>
</Header>
<Query>
<Filter name="status" criteria="OR">1</Filter>
<Filter name="resourceID" criteria="OR">test</Filter>
<Filter name="start" criteria="EQUALS">2012-04-01T00:00:00</Filter>
</Query>
</NikuDataBus>

I am updating status (Updating Status to 3) from output of above input. But i am getting below error and I am not able to apporve TS.

<?xml version="1.0" encoding="UTF-8"?>
<XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
<Severity>FATAL</Severity>
<Description>XOG-2014: Timesheet already submitted. Submitted timesheets can't be altered.</Description>
<Object type="timeperiod"/>
<Status state="SUCCESS"/>
<Statistics failureRecords="0" insertedRecords="1"
totalNumberOfRecords="1" updatedRecords="0"/>
<Records/>
</XOGOutput>

Please let me know where vI am going wrong?

Thanks,
Rahul.

Outcomes