Developer Q&A
Link Document URL to Work Order
Hi. I am trying to link a document stored in a web server to a Work Order. First I am validating the Work Order Number with the following XML by providing not the ID but the number (104740947):
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:int="http://corrigo.com/integration/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
soap:Header
int:CorrigoNetOptions
int:ImposeConcurrencyIdfalse</int:ImposeConcurrencyId>
int:UpdateLastModifiedfalse</int:UpdateLastModified>
int:CanDeleteMissingEntityfalse</int:CanDeleteMissingEntity>
int:LockOnDataRetrievalDefault</int:LockOnDataRetrieval>
</int:CorrigoNetOptions>
</soap:Header>
soap:Body
int:RetrieveMultiple
<int:queryExpression xsi:type="int:QueryExpression">
int:EntityTypeWorkOrder</int:EntityType>
<int:PropertySet xsi:type="int:PropertySet">
int:Properties
int:stringNumber</int:string>
</int:Properties>
</int:PropertySet>
int:Count0</int:Count>
int:FirstResultIndex0</int:FirstResultIndex>
int:Criteria
int:Filters
int:FilterExpression
int:Conditions
int:ConditionExpression
int:PropertyNameNumber</int:PropertyName>
int:OperatorEqual</int:Operator>
int:Values
<int:anyType xsi:type="xsd:string">104740947</int:anyType>
</int:Values>
</int:ConditionExpression>
</int:Conditions>
</int:FilterExpression>
</int:Filters>
</int:Criteria>
int:Distinctfalse</int:Distinct>
</int:queryExpression>
</int:RetrieveMultiple>
</soap:Body>
</soap:Envelope>
For which I get the following response (acknowledging that the entity exists):
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
soap:Body
</soap:Body>
</soap:Envelope>
Then, using the the Work Order ID returned (1001251), I am trying to add a document link to the Work Order with the following xml:
<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:UpdateLastModifiedfalse</int:UpdateLastModified>
int:CanDeleteMissingEntityfalse</int:CanDeleteMissingEntity>
int:LockOnDataRetrievalDefault</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:PerformDeletionfalse</int:PerformDeletion>
int:ConcurrencyId0</int:ConcurrencyId>
int:ActorId1001251</int:ActorId>
int:ActorTypeIdWO</int:ActorTypeId>
int:DescriptionTEST DESCRIPTION</int:Description>
int:TitleTEST TITLE</int:Title>
int:DocType
int:PerformDeletionfalse</int:PerformDeletion>
</int:DocType>
<int:EndDate xsi:nil="true"/>
int:ExtensionId0</int:ExtensionId>
int:IsSharedfalse</int:IsShared>
int:IsPublicfalse</int:IsPublic>
int:StorageTypeIdURL</int:StorageTypeId>
int:DocUrlhttps://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf</int:DocUrl>
int:MimeTypeapplication/pdf</int:MimeType>
</int:Entity>
</int:commandRequest>
</int:Execute>
</soap:Body>
</soap:Envelope>
For which I get the following xml response:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
soap:Body
</soap:Body>
</soap:Envelope>
My understanding is that for the Work Order ID (1001251) the document (160968) was created successfully. But when I enter the portal with my credentials, browse to the Work Order (using the number 104740947), scroll down to documents, I find out that there was no document attached to the Work Order. This API calls were working correctly a couple months ago, but now they are not. Is there something I am missing, or was there something new added that must be included to achieve this operation?
Any help with this will be greatly appreciated. Thanks in advance.
