Developer Q&A
Workorder with attachment failing.
Facing issue when creating workorder with attachment. I am using the same request payload without attachment which is working fine but along with attachment is giving error.
Request Payload:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:int="http://corrigo.com/integration/">
<soap:Header>
<int:CorrigoNetOptions>
<int:ImposeConcurrencyId>false</int:ImposeConcurrencyId>
<int:UpdateLastModified>false</int:UpdateLastModified>
<int:CanDeleteMissingEntity>false</int:CanDeleteMissingEntity>
<int:LockOnDataRetrieval>Default</int:LockOnDataRetrieval>
</int:CorrigoNetOptions>
</soap:Header>
<soap:Body>
<int:Execute>
<int:commandRequest xsi:type="int:CreateCommand" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<int:Entity xsi:type="int:Document">
<int:PerformDeletion>false</int:PerformDeletion>
<int:ConcurrencyId>0</int:ConcurrencyId>
<int:ActorId>1</int:ActorId>
<int:MainAsset>
<int:Id>3008</int:Id>
</int:MainAsset>
<int:ActorTypeId>WO</int:ActorTypeId>
<int:Description>TEST DESCRIPTION</int:Description>
<int:Title>TEST TITLE</int:Title>
<int:DocType>
<int:PerformDeletion>false</int:PerformDeletion>
</int:DocType>
<int:EndDate xsi:nil="true"/>
<int:ExtensionId>0</int:ExtensionId>
<int:IsShared>false</int:IsShared>
<int:IsPublic>false</int:IsPublic>
<int:StorageTypeId>URL</int:StorageTypeId>
<int:DocUrl>https://dummyimage.com/squarepopup</int:DocUrl>
<int:MimeType>application/pdf</int:MimeType>
</int:Entity>
</int:commandRequest>
</int:Execute>
</soap:Body>
</soap:Envelope>
Error:
0
Cannot insert the value NULL into column 'RestrictedEdit', table 'StageJLLCorporateOffices.dbo.dmDocObject'; column does not allow nulls. INSERT fails.
The statement has been terminated.
System.Data.SqlClient.SqlException