HomeGuidesAPI ReferenceChangelogDeveloper Q&A
HomeGuidesAPI ReferenceAnnouncementsLog In
Developer Q&A

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:ImposeConcurrencyIdfalse</int:ImposeConcurrencyId>
int:UpdateLastModifiedtrue</int:UpdateLastModified>
int:CanDeleteMissingEntityfalse</int:CanDeleteMissingEntity>
int:LockOnDataRetrievalDefault</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:Priority3</int:Priority>
int:TypeCategoryRequest</int:TypeCategory>
int:SubType
int:Id259</int:Id>
</int:SubType>
int:ContactNameMridul Ghimire</int:ContactName>
int:RequestorContact
int:Id118750</int:Id>
</int:RequestorContact> int:ContactAddress
int:AddrTypeIdContact</int:AddrTypeId>
int:ContactAddrTypePrimEmail</int:ContactAddrType>
int:Address[email protected]</int:Address>
</int:ContactAddress>
int:Customer
int:Id73</int:Id>
</int:Customer>
int:Items
int:WoItem
int:Asset
int:Id12514</int:Id>
</int:Asset>
int:Task
int:Id20531</int:Id>
</int:Task>
int:CommentFloor: 2, Room/Area: 2 - </int:Comment>
</int:WoItem>
</int:Items>
int:Documents
int:Document
int:ActorTypeIdWO</int:ActorTypeId>
<int:Description />
int:TitlePhoto</int:Title>
int:DocType
int:Id3</int:Id>
</int:DocType>
int:ExtensionId37</int:ExtensionId>
int:IsSharedfalse</int:IsShared>
int:IsPublicfalse</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:ImposeConcurrencyIdfalse</int:ImposeConcurrencyId>
int:UpdateLastModifiedtrue</int:UpdateLastModified>
int:CanDeleteMissingEntityfalse</int:CanDeleteMissingEntity>
int:LockOnDataRetrievalDefault</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:Priority3</int:Priority>
int:TypeCategoryRequest</int:TypeCategory>
int:SubType
int:Id259</int:Id>
</int:SubType>
int:ContactNameMridul Ghimire</int:ContactName>
int:RequestorContact
int:Id118750</int:Id>
</int:RequestorContact> int:ContactAddress
int:AddrTypeIdContact</int:AddrTypeId>
int:ContactAddrTypePrimEmail</int:ContactAddrType>
int:Address[email protected]</int:Address>
</int:ContactAddress>
int:Customer
int:Id73</int:Id>
</int:Customer>
int:Items
int:WoItem
int:Asset
int:Id12514</int:Id>
</int:Asset>
int:Task
int:Id20531</int:Id>
</int:Task>
int:CommentFloor: 2, Room/Area: 2 - </int:Comment>
</int:WoItem>
</int:Items>
int:Documents/
</int:WorkOrder>
int:ComputeScheduletrue</int:ComputeSchedule>
int:ComputeAssignmenttrue</int:ComputeAssignment>
</int:commandRequest>
</int:Execute>
</soap:Body>
</soap:Envelope>