Skip to Content
0
Jul 16 at 06:22 AM

CPI: SF OData Update issue using Batch Mode

291 Views

Hi Experts,

I am trying to update on EmployeeTime records to SF via Batch mode. I am using the below simply query in OData adapter.

While doing batch processing the message is getting failed with the below error in CPI.

While doing without batch processing the message is getting failed with the below error in CPI.

OData Error Response without Batchproceesing:

<?xml version="1.0" encoding="utf-8"?>
<error
	xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
	<code>COE_MISSING_REQUIRED_PROPERTIES</code>
	<message lang="en-US">[COE0027]Please add required properties in payload. Required properties timeTypeNav, userIdNav are missing. You can check which properties are required for an entity in Admin Center > OData API Data Dictionary or the entity metadata.</message>
</error>

Payload Trying to update with batch processing:

<?xml version='1.0' encoding='UTF-8'?>
<batchParts>
	<batchChangeSet>
		<batchChangeSetPart>
			<method>PUT</method>
			<EmployeeTime>
				<EmployeeTime>
					<externalCode>110162220210713</externalCode>
					<endDate>2021-07-13T00:00:00.000</endDate>
					<startDate>2021-07-13T00:00:00.000</startDate>
					<userId>1101622</userId>
					<timeType>LOP1</timeType>
				</EmployeeTime>
			</EmployeeTime>
		</batchChangeSetPart>
	</batchChangeSet>
</batchParts>

Payload Trying to update without batch processing:

<?xml version="1.0" encoding="UTF-8"?>
<EmployeeTime>
	<EmployeeTime>
		<externalCode>110162220210713</externalCode>
		<endDate>2021-07-13T00:00:00.000</endDate>
		<startDate>2021-07-13T00:00:00.000</startDate>
		<userId>1101622</userId>
		<timeType>LOP1</timeType>
	</EmployeeTime>
</EmployeeTime>

Any leads will be highly apprecicated.

Regards,

Pavan

Attachments

odata-adapter.png (26.7 kB)
error-log.png (20.3 kB)
err.png (17.4 kB)