PwsSaveDocumentLink

Overview


This web service creates a new document link. A document link is kind of like an uploaded document, but instead of the document being physically uploaded into Projector's document storage, an external link to the document is stored. Document links are only supported for project workspace documents, resource resumes, invoice attachments and project issue attachments. 

Request Format


PwsSaveDocumentLink Request

Request Elements


Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

No


Click here for more information.


SessionTicket

String

Yes


Click here for more information.

Ae9v30fDNwFMx833f5Hesg==

DocumentIdentity

PwsDocumentRefNo
If document identity is provided, this document is replaced with a new linked document using specified name and uri. If not provided, a new linked document is created using the specified name and URI. Note that the specified document identity must refer to a document link. A physical document cannot be converted into a document link. Click here for more information.
DocumentNameString (260)Yes
The name of the new linked document.Linked invoice #1
DocumentUriString (2000)Yes
The URI of the new linked document.
https://www.accountexnetwork.com/blog/wp-content/uploads/2013/08/image33.png
FolderIdentityPwsFolderRefYes
The identity of the folder where this linked document should resides. Click here for more information. The folder is linked to the Projector entity (e.g. Project, Resource, Issue or Invoice) that the link is to be associated with. See PwsGetFolder for details on how to obtain the proper folder identity to pass in here.
OverrideLockFlagBooleanNo
For update, if set to 'true', save can proceed even when the document link is locked.false

Request Usage Example(s)


Example 01 - replacing an existing linked document
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:doc="http://projectorpsa.com/DataContracts/Shared/DocumentManagement/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveDocumentLink>
         <pws:serviceRequest>
            <req:SessionTicket>ATtU220EvBSE2+GCN9U58g==</req:SessionTicket>
            <doc:DocumentIdentity>
               <com:DocumentRefUid>1152921504607653980</com:DocumentRefUid>
            </doc:DocumentIdentity>
            <doc:DocumentName>Invoice link only</doc:DocumentName>
            <doc:DocumentUri>https://www.accountexnetwork.com/blog/wp-content/uploads/2013/08/image33.png</doc:DocumentUri>
            <doc:FolderIdentity>
               <com:FolderUid>1152921504607342206</com:FolderUid>
            </doc:FolderIdentity>
         </pws:serviceRequest>
      </pws:PwsSaveDocumentLink>
   </soapenv:Body>
</soapenv:Envelope>
Example 02 - creating a new linked document
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:doc="http://projectorpsa.com/DataContracts/Shared/DocumentManagement/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveDocumentLink>
         <pws:serviceRequest>
            <req:SessionTicket>AftyRXSTlnMPzozuKwq0kQ==</req:SessionTicket>
            <doc:DocumentName>Invoice link 3</doc:DocumentName>
            <doc:DocumentUri>https://www.accountexnetwork.com/blog/wp-content/uploads/2013/08/image33.png?x54120</doc:DocumentUri>
            <doc:FolderIdentity>
               <com:FolderUid>1152921504607342206</com:FolderUid>
            </doc:FolderIdentity>
         </pws:serviceRequest>
      </pws:PwsSaveDocumentLink>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


PwsSetDocumentUri Response

Response Elements


Element

Data Type

Description

Sample Data

Messages

PwsMessage[]

The web service response status and message. Click here for more information.


ResponseId

Int32

Click here for more information.

0

Status

RequestStatus

Click here for more information.

Ok

ServerTimestampUtc

DateTime

Click here for more information.

2018-03-20T13:33:31.3991044Z

DocumentIdentity

PwsDocumentRef

The identity of the newly created linked document. Click here for more information.


Response Usage Example(s)


Example 01 - replacing an existing linked document
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsSaveDocumentLinkResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsSaveDocumentLinkResult xmlns:a="http://projectorpsa.com/DataContracts/Shared/DocumentManagement/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
            <ResponseId xmlns="http://projectorpsa.com/CommonServices/">0</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-03-15T19:52:50.297197Z</ServerTimestampUtc>
            <a:DocumentIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:DocumentRefId i:nil="true"/>
               <b:DocumentRefUid>1152921504607653983</b:DocumentRefUid>
            </a:DocumentIdentity>
         </PwsSaveDocumentLinkResult>
      </PwsSaveDocumentLinkResponse>
   </s:Body>
</s:Envelope>
Example 02 - creating a new linked document
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsSaveDocumentLinkResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsSaveDocumentLinkResult xmlns:a="http://projectorpsa.com/DataContracts/Shared/DocumentManagement/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
            <ResponseId xmlns="http://projectorpsa.com/CommonServices/">0</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-03-20T17:41:06.5016178Z</ServerTimestampUtc>
            <a:DocumentIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:DocumentRefId i:nil="true"/>
               <b:DocumentRefUid>1152921504607655864</b:DocumentRefUid>
            </a:DocumentIdentity>
         </PwsSaveDocumentLinkResult>
      </PwsSaveDocumentLinkResponse>
   </s:Body>
</s:Envelope>

PwsSaveDocumentLink - Common Errors and Warnings

ErrorNumberErrorCodeErrorText
10106InvalidUrlThe value specified in the field "DocumentUri" in the class "PwsSaveDocumentLinkRq" was not recognized as a proper URL.
10111RequiredFieldMissingA required field is missing: FolderIdentity
75078DocumentNameAlreadyInUseThis folder already contains a document with the same name. Operation cannot be completed.
75179DocumentNameIsRequiredDocument name is required when uploading a new document.
75199DocumentNotFoundDocument not found.
75185FolderTypeDoesNotSupportDocumentLinksThis type of folder does not support file links.
75205FolderNotFoundFolder not found.