Developer Q&A

Ask a Question
Back to All

Workorder submission with attachment failing.

We are facing an issue where workorder submission with attachment is failing. We've been using the same request body in the past with no problem but started seeing this error recently. This is a time sensitive matter and any prompt help would be greatly appreciated.

Here is the request body .

<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>true</int:UpdateLastModified>
<int:CanDeleteMissingEntity>false</int:CanDeleteMissingEntity>
<int:LockOnDataRetrieval>Default</int:LockOnDataRetrieval>
</int:CorrigoNetOptions>
</soap:Header>
<soap:Body>
<int:Execute>
Optional:
<int:commandRequest xsi:type="int:WoCreateCommand" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<int:WorkOrder>
<int:Priority>3</int:Priority>
<int:TypeCategory>Request</int:TypeCategory>
<int:SubType>
<int:Id>259</int:Id>
</int:SubType>
<int:ContactName>Mridul Ghimire</int:ContactName>
<int:RequestorContact>
<int:Id>118750</int:Id>
</int:RequestorContact> <int:ContactAddress>
<int:AddrTypeId>Contact</int:AddrTypeId>
<int:ContactAddrType>PrimEmail</int:ContactAddrType>
<int:Address>[email protected]</int:Address>
</int:ContactAddress>
<int:Customer>
<int:Id>73</int:Id>
</int:Customer>
<int:Items>
<int:WoItem>
<int:Asset>
<int:Id>12514</int:Id>
</int:Asset>
<int:Task>
<int:Id>20531</int:Id>
</int:Task>
<int:Comment>Floor: 2, Room/Area: 2 - </int:Comment>
</int:WoItem>
</int:Items>
<int:Documents>
<int:Document>
<int:ActorTypeId>WO</int:ActorTypeId>
<int:Description />
<int:Title>Photo</int:Title>
<int:DocType>
<int:Id>3</int:Id>
</int:DocType>
<int:ExtensionId>37</int:ExtensionId>
<int:IsShared>false</int:IsShared>
<int:IsPublic>false</int:IsPublic>

			        <int:StorageTypeId>Local</int:StorageTypeId>
			        <int:Blob>
			        	<int:Body>/9j/4AAQSkZJRgABAAEAYABgAAD//gAfTEVBRCBUZWNobm9sb2dpZXMgSW5jLiBWMS4wMQD/2wCEAAUFBQgFCAwHBwwMCQkJDA0MDAwMDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0ND</int:Body>
			        	<int:FileName>Photo.jpg</int:FileName>
			        	<int:TypeId>80</int:TypeId>
			        </int:Blob>
			        <int:DocUrl></int:DocUrl>
			        <int:MimeType>image/jpg</int:MimeType>
			    </int:Document>
			        </int:Documents>
                </int:WorkOrder>
                <int:ComputeSchedule>true</int:ComputeSchedule>
                <int:ComputeAssignment>true</int:ComputeAssignment>
             </int:commandRequest>
          </int:Execute>
       </soap:Body>
    </soap:Envelope>

ERROR MESSAGE:

Cannot insert the value NULL into column 'RestrictedEdit', table 'JllCapitalOneWps.dbo.dmDocObject'; column does not allow nulls. INSERT fails.
The statement has been terminated.

---------Request with no attachment---Runs Successfully and returns a WO number.

<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>true</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:WoCreateCommand" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<int:WorkOrder>
<int:Priority>3</int:Priority>
<int:TypeCategory>Request</int:TypeCategory>
<int:SubType>
<int:Id>259</int:Id>
</int:SubType>
<int:ContactName>Mridul Ghimire</int:ContactName>
<int:RequestorContact>
<int:Id>118750</int:Id>
</int:RequestorContact> <int:ContactAddress>
<int:AddrTypeId>Contact</int:AddrTypeId>
<int:ContactAddrType>PrimEmail</int:ContactAddrType>
<int:Address>[email protected]</int:Address>
</int:ContactAddress>
<int:Customer>
<int:Id>73</int:Id>
</int:Customer>
<int:Items>
<int:WoItem>
<int:Asset>
<int:Id>12514</int:Id>
</int:Asset>
<int:Task>
<int:Id>20531</int:Id>
</int:Task>
<int:Comment>Floor: 2, Room/Area: 2 - </int:Comment>
</int:WoItem>
</int:Items>
<int:Documents/>
</int:WorkOrder>
<int:ComputeSchedule>true</int:ComputeSchedule>
<int:ComputeAssignment>true</int:ComputeAssignment>
</int:commandRequest>
</int:Execute>
</soap:Body>
</soap:Envelope>